Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD for snapper-git

By: a guest on Apr 24th, 2013  |  syntax: Bash  |  size: 2.10 KB  |  views: 31  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Tom Kuther <gimpel@sonnenkinder.org>
  2.  
  3. pkgname=snapper-git
  4. pkgver=20130424
  5. pkgrel=1
  6. pkgdesc="A tool for managing btrfs snapshots. It can compare snapshots and revert differences between snapshots."
  7. provides=('snapper')
  8. conflicts=('snapper')
  9. arch=('i686' 'x86_64')
  10. url="http://en.opensuse.org/Portal:Snapper"
  11. license=('GPL2')
  12. depends=('libxml2' 'openssl' 'pcre' 'python' 'dbus')
  13. makedepends=('boost' 'swig')
  14. backup=('etc/conf.d/snapper')
  15. source=()
  16. md5sums=()
  17. install=snapper.install
  18.  
  19. _gitroot='https://github.com/openSUSE/snapper.git'
  20. _gitname='snapper'
  21.  
  22. build() {
  23.   cd "$srcdir"
  24.   msg "Connecting to GIT server...."
  25.  
  26.   if [[ -d "$_gitname" ]]; then
  27.     cd "$_gitname" && git pull origin
  28.     msg "The local files are updated."
  29.   else
  30.     git clone "$_gitroot" "$_gitname"
  31.   fi
  32.  
  33.   msg "GIT checkout done or server timeout"
  34.   msg "Starting build..."
  35.  
  36.   rm -rf "$srcdir/$_gitname-build"
  37.   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  38.   cd "$srcdir/$_gitname-build"
  39.  
  40.   # don't install zypper plugin
  41.   sed -i '/usr\/lib\/zypp/d' scripts/Makefile.am
  42.   # rename cron scripts
  43.   sed -i -e 's@suse.de-@@g' scripts/Makefile.am
  44.  
  45.   # boost fixlets
  46.   # don't link against non-existant libbost_thread-mt
  47.   sed -i -e 's@lboost_thread-mt@lboost_thread@g' snapper/Makefile.am
  48.   # add -lboost_system
  49.   sed -E -i 's@snapperd_LDADD(.*)@snapperd_LDADD\1 \-lboost_system@g' server/Makefile.am
  50.   sed -E -i 's@snapper_LDADD(.*)@snapper_LDADD\1 \-lboost_system@g' client/Makefile.am
  51.   sed -E -i 's@LDADD(.*)@LDADD\1 \-lboost_system@g' examples/Makefile.am
  52.   sed -E -i 's@LDADD(.*)@LDADD\1 \-lboost_system@g' testsuite-cmp/Makefile.am
  53.  
  54.   aclocal
  55.   libtoolize --force --automake --copy
  56.   autoheader
  57.   automake --add-missing --copy
  58.   autoconf
  59.   export CPPFLAGS="`pkg-config --cflags python3`"
  60.   ./configure --prefix=/usr --with-conf=/etc/conf.d
  61.   make
  62. }
  63.  
  64. package() {
  65.   cd ${_gitname}-build
  66.   msg2 "Running make install"
  67.   make DESTDIR=${pkgdir} install
  68.   mkdir ${pkgdir}/etc/conf.d
  69.   install -D -m 644 data/sysconfig.snapper ${pkgdir}/etc/conf.d/snapper
  70. }
  71.  
  72. # vim:set ts=2 sw=2 et:
clone this paste RAW Paste Data