diff options
author | Chocobo1 | 2020-01-11 22:15:45 +0800 |
---|---|---|
committer | Chocobo1 | 2020-01-11 22:33:53 +0800 |
commit | c63f8e2a9e63673216f4340faa7617d5a2ce4703 (patch) | |
tree | 8787bbf255f483df92d7efefab56014c6df1b65c | |
download | aur-c63f8e2a9e63673216f4340faa7617d5a2ce4703.tar.gz |
newpkg: lsof-git 4.93.2.r96.gdf01ed3-1
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 40 |
2 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3c133f4c0701 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = lsof-git + pkgdesc = List open files running processes + pkgver = 4.93.2.r96.gdf01ed3 + pkgrel = 1 + url = https://github.com/lsof-org/lsof + arch = i686 + arch = x86_64 + license = custom + makedepends = git + depends = glibc + depends = libtirpc + provides = lsof + conflicts = lsof + source = git+https://github.com/lsof-org/lsof.git + sha256sums = SKIP + +pkgname = lsof-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..678108daebd1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net> + +pkgname=lsof-git +pkgver=4.93.2.r96.gdf01ed3 +pkgrel=1 +pkgdesc="List open files running processes" +arch=('i686' 'x86_64') +url="https://github.com/lsof-org/lsof" +license=('custom') +depends=('glibc' 'libtirpc') +makedepends=('git') +provides=('lsof') +conflicts=('lsof') +source=("git+https://github.com/lsof-org/lsof.git") +sha256sums=('SKIP') + + +pkgver() { + cd "lsof" + + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "lsof" + + ./Configure -n linux + make CC="cc $CFLAGS $CPPFLAGS $LDFLAGS" +} + +package() { + cd "lsof" + + install -Dm755 "lsof" -t "$pkgdir/usr/bin" + install -Dm644 "Lsof.8" "$pkgdir/usr/share/man/man8/lsof.8" + + sed -n '/^ \* Copyright 1994 Purdue/,/removed or altered./p' "main.c" > "LICENSE" + sed -i -e 's|^ \*||g;s|^ ||g' "LICENSE" + install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/lsof" +} |