summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCody P Schafer2016-06-29 13:38:49 -0400
committerCody P Schafer2016-06-29 13:38:49 -0400
commite629de8c501ab5fd2c011b5668d290366b2f0cd7 (patch)
tree8b2180596ab9a2cd870b53455366de6c1902f367
downloadaur-e629de8c501ab5fd2c011b5668d290366b2f0cd7.tar.gz
initial
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD55
3 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f41683e7df92
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = haskell-pcap
+ pkgdesc = A system-independent interface for user-level packet capture
+ pkgver = 0.4.5.2
+ pkgrel = 1
+ url = https://github.com/bos/pcap
+ arch = x86_64
+ license = custom:BSD3
+ makedepends = git
+ depends = ghc
+ provides = haskell-pcap
+ conflicts = haskell-pcap
+ options = !emptydirs
+ source = http://hackage.haskell.org/packages/archive/pcap/0.4.5.2/pcap-0.4.5.2.tar.gz
+ md5sums = 492b7ecc53d0ac3599845ab8ac553997
+
+pkgname = haskell-pcap
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..924dfb95c209
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+pkg/
+src/
+*.tar.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..82bf322a384f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Cody P Schafer <archlinux at codyps.com>
+_ipn=pcap
+_bpn=haskell-${_ipn}
+pkgname=${_bpn}
+pkgver=0.4.5.2
+pkgrel=1
+pkgdesc="A system-independent interface for user-level packet capture"
+arch=(x86_64)
+url="https://github.com/bos/pcap"
+license=('custom:BSD3')
+groups=()
+depends=(ghc)
+makedepends=(git)
+provides=(${_bpn})
+conflicts=(${_bpn})
+replaces=()
+backup=()
+options=(!emptydirs)
+install=
+source=("http://hackage.haskell.org/packages/archive/${_ipn}/${pkgver}/${_ipn}-${pkgver}.tar.gz")
+md5sums=('492b7ecc53d0ac3599845ab8ac553997')
+
+build() {
+ cd "$srcdir/${_ipn}-${pkgver}"
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+_ghcver_set() {
+ local _i
+ _ghcver=`pacman -Q ghc | cut -f2 -d\ | cut -f1 -d-`
+ depends[0]="ghc=$_ghcver"
+}
+
+package() {
+ _ghcver_set
+ cd "$srcdir/${_ipn}-${pkgver}"
+
+ install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+ install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+ install -dm755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_ipn}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
+
+# vim:set ts=2 sw=2 et: