Last active
May 22, 2016 10:50
-
-
Save kd35a/5f7e4965b305a0dc422b9f55c6ed3a11 to your computer and use it in GitHub Desktop.
Add a man page for pkgcacheclean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From a13417d296f78623675b7d2e40e46e48601a5cbc Mon Sep 17 00:00:00 2001 | |
From: Fredrik Strandin <[email protected]> | |
Date: Sun, 22 May 2016 12:23:49 +0200 | |
Subject: [PATCH] Add a man page | |
--- | |
.SRCINFO | 6 ++++-- | |
PKGBUILD | 10 +++++++--- | |
pkgcacheclean.8 | 40 ++++++++++++++++++++++++++++++++++++++++ | |
3 files changed, 51 insertions(+), 5 deletions(-) | |
create mode 100644 pkgcacheclean.8 | |
diff --git a/.SRCINFO b/.SRCINFO | |
index a73609a..dd25d8a 100644 | |
--- a/.SRCINFO | |
+++ b/.SRCINFO | |
@@ -1,9 +1,9 @@ | |
# Generated by mksrcinfo v8 | |
-# Mon Feb 1 15:39:48 UTC 2016 | |
+# Sun May 22 10:49:08 UTC 2016 | |
pkgbase = pkgcacheclean | |
pkgdesc = Application to clean the pacman cache | |
pkgver = 1.8.2 | |
- pkgrel = 3 | |
+ pkgrel = 4 | |
url = https://bbs.archlinux.org/viewtopic.php?pid=841774 | |
arch = i686 | |
arch = x86_64 | |
@@ -13,7 +13,9 @@ pkgbase = pkgcacheclean | |
license = GPL | |
depends = pacman>=5 | |
source = pkgcacheclean.c | |
+ source = pkgcacheclean.8 | |
md5sums = d79fac7e27381249774fc8e6f15d7f2e | |
+ md5sums = 965889f755e4611c12f8c9ac0048372d | |
pkgname = pkgcacheclean | |
diff --git a/PKGBUILD b/PKGBUILD | |
index 0ff20da..843b9ba 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -2,23 +2,27 @@ | |
pkgname=pkgcacheclean | |
pkgver=1.8.2 | |
-pkgrel=3 | |
+pkgrel=4 | |
pkgdesc="Application to clean the pacman cache" | |
arch=('i686' 'x86_64' 'armv5' 'armv6' 'armv7') | |
url='https://bbs.archlinux.org/viewtopic.php?pid=841774' | |
license=('GPL') | |
depends=('pacman>=5') | |
-source=($pkgname.c) | |
-md5sums=('d79fac7e27381249774fc8e6f15d7f2e') | |
+source=($pkgname.c | |
+ $pkgname.8) | |
+md5sums=('d79fac7e27381249774fc8e6f15d7f2e' | |
+ '965889f755e4611c12f8c9ac0048372d') | |
build() | |
{ | |
cd "$srcdir" | |
gcc -o $pkgname $CFLAGS -DVERSION=\"$pkgver\" -DCARCH=\"$CARCH\" \ | |
$pkgname.c -lalpm $LDFLAGS | |
+ gzip --keep --force $pkgname.8 | |
} | |
package() | |
{ | |
install -m 755 -D "$srcdir/$pkgname" "$pkgdir/usr/bin/$pkgname" | |
+ install -m 644 -D "$srcdir/$pkgname.8.gz" "$pkgdir/usr/share/man/man8/$pkgname.8.gz" | |
} | |
diff --git a/pkgcacheclean.8 b/pkgcacheclean.8 | |
new file mode 100644 | |
index 0000000..d2d1c5e | |
--- /dev/null | |
+++ b/pkgcacheclean.8 | |
@@ -0,0 +1,40 @@ | |
+.TH pkgcacheclean 8 "2016-05-22" "pkgcacheclean 1.8.2" "pkgcacheclean manual" | |
+.SH NAME | |
+pkgcacheclean \- a simple utility to clean pacman cache | |
+.SH SYNOPSIS | |
+.B pkgcacheclean | |
+[option...] [preserve_number] | |
+.SH DESCRIPTION | |
+For installed packages, \fIpreserve_number\fR of versions are reserved. This | |
+includes the current version and the newest (\fIpreserve_number\fR - 1) of the | |
+remaining. For uninstalled packages all versions are deleted. The default | |
+number is 2. | |
+.SH OPTIONS | |
+.TP | |
+\-n, \-\-dry-run | |
+Perform a trial run with no changes made | |
+.TP | |
+\-d, \-\-cachedir=PATH | |
+Set alternative (absolute) cache directory PATH. Default is /var/cache/pacman/pkg/ | |
+.TP | |
+\-k, \-\-all\-as\-installed | |
+Treat not-installed packages as installed | |
+.TP | |
+\-v, \-\-verbose | |
+Verbose output | |
+.TP | |
+\-q, \-\-quiet | |
+Suppress output, default | |
+.TP | |
+\-?, \-\-help | |
+Give a help list | |
+.TP | |
+\-\-usage | |
+Give a short usage message | |
+.TP | |
+\-V, \-\-version | |
+Print program version | |
+.SH EXAMPLES | |
+.TP | |
+Do a verbose dry-run for cleaning up all but the latest 3 versions: | |
+.B pkgcacheclean -nv 3 | |
-- | |
2.8.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment