Guest User

Untitled

a guest
Aug 29th, 2017
513
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=sks
  2. pkgver=1.1.6
  3. pkgrel=3
  4. arch=('i686' 'x86_64')
  5. license=('GPL')
  6. pkgdesc='Synchronizing OpenPGP Key Server'
  7. makedepends=('ocaml' 'db' 'camlp4')
  8. url='https://bitbucket.org/skskeyserver/sks-keyserver/'
  9. install='sks.install'
  10. backup=('etc/sks/sksconf'
  11. 'etc/sks/forward.exim'
  12. 'etc/sks/forward.postfix'
  13. 'etc/sks/mailsync'
  14. 'etc/sks/membership'
  15. 'etc/sks/procmail')
  16. source=(
  17. https://bitbucket.org/skskeyserver/sks-keyserver/downloads/${pkgname}-${pkgver}.tgz{,.asc}
  18. '500_debian_fhs.patch'
  19. 'debian_eventloopfix.patch'
  20. 'sks-db.service'
  21. 'sks-recon.service'
  22. 'cryptokit-1.7-sks-uint32.patch')
  23. sha512sums=(
  24. 'f7c54194274834840b9701bf827b81add0f807dd4c6019968a6b0c755c9117519433ebb1161da38d23c465b163dd31a766700023afa13174e4dc82542fa98099'
  25. SKIP
  26. '0fd57ccd86f289cf51638995555988a572ee00d6f28f3797092ffda19a0f668ee950be1ef381e94c64301db2dd1ad308834a45b7eaec148e9d8c01ed0a1829bc'
  27. '9463538f5668cdd41b25c43e31a2621e1c0953430b8dde84e54be4a45aa3f9ffbfcd270c83583df2a5462163eaf014fee3c3ed49f436faf71db7e87db88626b4'
  28. '5628e6a0065ec9bab4df84e77bed0af51379e70021543dfee4d4181f55b2779735fcea7848b51e2ab555f9f988da5aff8f0f15e522b801d7330e4bb2e53701fc'
  29. '41352e9862996170c70ed8e546ad89e26c94bf3c4ef7e91b64f330273b94c2666cf3f11f13a54e66b1a29b3ef46b75c8c6dfbe49fe12e2b11451e8311faf68a9'
  30. '6ee333ce8aec0b103a36be376da43a569ed455f554fe853d007afc1d2e3a30d29735f515d22646832a8b4efa1ffdbfadb4a85ec22f2e5159180fc8373252c171'
  31. )
  32. validpgpkeys=(C90EF1430B3AC0DFD00E6EA541259773973A612A) # SKS Keyserver Signing Key
  33.  
  34.  
  35. prepare() {
  36. cd "$pkgname-$pkgver"
  37.  
  38. # patch path
  39. patch -Np1 -i "$srcdir/500_debian_fhs.patch"
  40. patch -Np1 -i "$srcdir/debian_eventloopfix.patch"
  41.  
  42. cp Makefile.local.unused Makefile.local
  43.  
  44. # XXX Due to how ocaml package is generated in arch, we cannot link
  45. # dynamically, so we workarround the problem using runtime-variant _pic
  46. # More info:
  47. # - https://wiki.ubuntu.com/SteveBeattie/PIENotes#Incompatible_relocation_R_X86_64_32
  48. # - https://bugs.archlinux.org/task/42748
  49. # - http://caml.inria.fr/mantis/view.php?id=6693
  50. echo "OCAMLOPT=ocamlopt -runtime-variant _pic" >> Makefile.local
  51.  
  52. sed -i -e 's#LIBDB=-ldb-4.6#LIBDB=-ldb-5.3#g' Makefile.local
  53. sed -i -e "s#/usr/local#$pkgdir/usr#g" Makefile.local
  54. sed -i -e "s#/usr/share/man#$pkgdir/usr/share/man#g" Makefile.local
  55. }
  56.  
  57. build() {
  58. cd "$pkgname-$pkgver"
  59. unset MAKEFLAGS
  60. make dep
  61. make "cryptokit-1.7/README.txt"
  62.  
  63. patch -Np0 -i "$srcdir/cryptokit-1.7-sks-uint32.patch"
  64.  
  65. # XXX Parallel compiling not supporting for Bdb module, force -j1 always.
  66. make CFLAGS="$CFLAGS -I`ocamlc -where` -I ." -j1 all
  67. }
  68.  
  69. package() {
  70. cd "$pkgname-$pkgver"
  71.  
  72. make PREFIX="$pkgdir/usr" MANDIR="$pkgdir/usr/share/man" install
  73.  
  74. install -Dm644 "$srcdir/sks-db.service" "$pkgdir/usr/lib/systemd/system/sks-db.service"
  75. install -Dm644 "$srcdir/sks-recon.service" "$pkgdir/usr/lib/systemd/system/sks-recon.service"
  76.  
  77. mkdir -p "$pkgdir/etc" "$pkgdir/var/lib/sks"
  78.  
  79. cp -r sampleWeb/OpenPKG "$pkgdir/var/lib/sks"
  80. cp -r sampleConfig/debian "$pkgdir/etc/sks"
  81.  
  82. sed -i -e 's#/usr/lib/sendmail#/usr/sbin/sendmail#g' "$pkgdir/etc/sks/sksconf"
  83. }
RAW Paste Data