SHARE
TWEET

fantbuild build.sh

bocke May 3rd, 2012 16 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. PKGNAME=fantbuild
  4. PKGVER=git`date +'%Y%m%d%H%M'`
  5. PKGARCH=noarch
  6. TAG=Bocke
  7. BUILD=1
  8. PKGEXT=txz
  9.  
  10. GITURL=git://git.code.sf.net/p/fantbuild/code
  11.  
  12. CWD=$PWD
  13. SRCDIR=$CWD/$PKGNAME
  14. PKGDIR=$CWD/build
  15. PREFIX=/usr/local
  16. PKGPREFIX=$PKGDIR/$PREFIX
  17. INSTDIR=$PKGDIR/install
  18.  
  19. BINDIR=$PKGPREFIX/bin
  20. MANDIR=$PKGPREFIX/man
  21.  
  22. set -e
  23.  
  24. # clean up
  25. if [ -d $SRCDIR ];then
  26.         rm -fr $SRCDIR
  27. fi
  28. if [ -d $PKGDIR ];then
  29.         rm -fr $PKGDIR
  30. fi
  31.  
  32. # clone git repository  
  33. git clone $GITURL $PKGNAME
  34.  
  35. # install
  36. cd $PKGNAME
  37. install -d -m 755 $BINDIR
  38. install -d -m 755 $MANDIR
  39. for SECT in 5 8;do
  40.         install -d -m 755 $MANDIR/man$SECT
  41.         install -m 644 $SRCDIR/doc/man/*.$SECT $MANDIR/man$SECT
  42.         gzip $MANDIR/man$SECT/*
  43. done
  44. install -m 755 $SRCDIR/$PKGNAME $BINDIR
  45.  
  46. # install slack-desc
  47. install -d -m 755 $INSTDIR
  48. cp $CWD/slack-desc $INSTDIR
  49.  
  50. # make the package
  51. cd $PKGDIR
  52. fakeroot /sbin/makepkg -l y -c n $CWD/$PKGNAME-$PKGVER-$PKGARCH-${BUILD}${TAG}.$PKGEXT
  53.  
  54. # clean up
  55. cd $CWD
  56. rm -fr $PKGDIR
  57. rm -fr $SRCDIR
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top