diff options
author | Yunchih Chen <yunchih.cat@gmail.com> | 2018-03-20 22:28:39 +0800 |
---|---|---|
committer | Yunchih Chen <yunchih.cat@gmail.com> | 2018-03-20 22:28:39 +0800 |
commit | e192f105d6d85814cb2a3b2abd8eae58ede858cf (patch) | |
tree | 6708b568abe03a100c80ba1c28bb1c7ff9102269 | |
parent | b4dad31a95ebb45a44a719b1c190e445ae5b5afb (diff) | |
download | nfcollect-e192f105d6d85814cb2a3b2abd8eae58ede858cf.tar.gz nfcollect-e192f105d6d85814cb2a3b2abd8eae58ede858cf.tar.zst nfcollect-e192f105d6d85814cb2a3b2abd8eae58ede858cf.zip |
Add package.sh and PKGBUILD for packaging
-rwxr-xr-x | package.sh | 26 | ||||
-rw-r--r-- | packaging/archlinux/PKGBUILD | 28 |
2 files changed, 54 insertions, 0 deletions
diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..1ac2795 --- /dev/null +++ b/package.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +PKGNAME=nfcollect +PKGVER=0.1 +PKGREL=1 +PKGDIR=${PKGNAME}-${PKGVER} +PKG="${PKGNAME}-${PKGVER}-${PKGREL}.tar.gz" + +echo "Packaging $PKG ..." +echo + +mkdir -p "${PKGDIR}" +cp -a bin lib include \ + configure configure.ac build-aux \ + Makefile.{in,am} \ + service \ + "${PKGDIR}" + +tar --exclude "*.swp" \ + --exclude .deps \ + --exclude .dirstamp \ + -zcvf "$PKG" "${PKGDIR}" + +SHA1=$(sha1sum "$PKG" | cut -f1 -d' ') +echo +echo "The SHA1 sum of $PKG is $SHA1" diff --git a/packaging/archlinux/PKGBUILD b/packaging/archlinux/PKGBUILD new file mode 100644 index 0000000..8004927 --- /dev/null +++ b/packaging/archlinux/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: Yun-Chih Chen <yunchih@csie.ntu.edu.tw> +pkgname=nfcollect +pkgver=0.1 +pkgrel=1 +pkgdesc='Collect NFLOG log entries and commit them to stable storage in binary (compressed) format' +arch=(x86_64) +url='https://github.com/yunchih/nfcollect' +license=(MIT) +makedepends=(automake make) +depends=(libnetfilter_log zstd) +source=(https://github.com/yunchih/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}-${pkgrel}.tar.gz) +sha1sums=('75b13cda95986cfc0c43155cdc1cd23236bad2f3') + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr + make +} + +check() { + true +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + install -Dm644 "service/${pkgname}.service" "$pkgdir"/usr/lib/systemd/system/${pkgname}.service +} |