SHARE
TWEET

archlinux-pkgbuild-onioncat-git.txt

a guest Nov 18th, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: revel <revelΘmuub·net>
  2. # Contributor: jwwolf <jwwolf+arch@gmail.com>
  3. # Contributor: anon@publicdomain
  4.  
  5. # dear maintainers
  6. # please upload onioncat source archives to github.com
  7. # so we can at least verify checksums
  8. # like
  9. # https://www.cypherpunk.at/ocat/download/Source/0.2.2/onioncat-0.2.2.r578.tar.gz{,.asc}
  10. # which is currently not accessible --> http 403 forbidden
  11.  
  12. # also
  13. # please fix configure.ac
  14. # and src/.deps/*.Po
  15. # see build() function
  16.  
  17. _pkgnamepfx=onioncat
  18. pkgname=${_pkgnamepfx}-git
  19. _pkgverpfx=0.2.2.
  20. pkgver=${_pkgverpfx}r245.8e7f6eb
  21. pkgrel=1
  22. pkgdesc='An IP-Transparent Tor Hidden Service Connector'
  23. arch=('i686' 'x86_64')
  24. url='https://www.onioncat.org/'
  25. license=('GPL3')
  26. depends=('tor' 'net-tools')
  27. makedepends=('git')
  28. provides=("$_pkgnamepfx")
  29. conflicts=("$_pkgnamepfx")
  30.  
  31. # in microsoft-github we trust ... not
  32. install=
  33. source=('git+https://github.com/rahra/onioncat.git')
  34.  
  35. noextract=()
  36. md5sums=('SKIP')
  37.  
  38. build() {
  39.     cd "$srcdir/$_pkgnamepfx"
  40.  
  41.     # patch svn --> git
  42.     # 'EOF' disables variable expansion
  43. cat << 'EOF' | patch -p1
  44. --- a/configure.ac
  45. +++ b/configure.ac
  46. @@ -1,6 +1,6 @@
  47.  
  48.  AC_PREREQ(2.62)
  49. -define([svnversion], esyscmd([sh -c "echo -n $(( `svnversion | tr -d 'M'` + 1 ))"]))dnl
  50. +define([svnversion], esyscmd([sh -c 'printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"']))dnl
  51.  AC_INIT([onioncat],[[0.2.2.r]svnversion],[rahra@cypherpunk.at])
  52.  AM_INIT_AUTOMAKE([-Wall -Werror])
  53.  AC_CONFIG_HEADERS([config.h])
  54. EOF
  55.  
  56.     aclocal
  57.     autoconf
  58.     # ... otherwise configure will complain about aclocal version mismatch
  59.  
  60.     ./configure --prefix=/usr
  61.  
  62.     # create dummy *.Po files
  63.     mkdir src/.deps
  64.     while read f
  65.     do
  66.         echo touch src/.deps/$f
  67.         touch src/.deps/$f
  68.     done < <(grep -o -E './\$\(DEPDIR\)/[^ ]*.Po' src/Makefile.in | cut -c13-)
  69.  
  70.     make
  71. }
  72.  
  73. package() {
  74.     cd "$srcdir/$_pkgnamepfx"
  75.     make DESTDIR="$pkgdir/" install
  76. }
  77.  
  78. pkgver() {
  79.     cd "$srcdir/$_pkgnamepfx"
  80.     # Git, no tags available
  81.     printf "%sr%s.%s" ${_pkgverpfx} "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  82. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top