Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. NAME=vbootstrap
  2. VERSION=$(shell awk '/%define version/ { print $$3 }' ${NAME}-vl.spec)
  3. REVISION=$(shell LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2)
  4. VBUILDER_STABLE_VERSION=5.2
  5. VBUILDER_DEFAULT_VERSION=VineSeed
  6. VBUILDER_CATEGORIES=main,plus,nonfree
  7. VBUILDER_VBOOTSTRAP_DIR=/var/local/vbootstrap
  8. #VBUILDER_CACHE_DIR=$$\{VBOOTSTRAP_DIR\}/cache
  9. VBUILDER_CACHE_DIR=/var/local/vbootstrap/cache
  10. VBUILDER_BUILT_RPMS_DIR=$$\{HOME\}/rpm/vbuilder
  11. DESTDIR=
  12. all:
  13. sed -e "s/@@VBOOTSTRAP_VERSION@@/${VERSION}/g" \
  14. vbootstrap.sh.in > vbootstrap.sh
  15. sed -e "s/@@VBUILDER_STABLE_VERSION@@/${VBUILDER_STABLE_VERSION}/g" \
  16. -e "s/@@VBUILDER_DEFAULT_VERSION@@/${VBUILDER_DEFAULT_VERSION}/g" \
  17. -e "s/@@VBUILDER_CATEGORIES@@/${VBUILDER_CATEGORIES}/g" \
  18. -e "s|@@VBUILDER_VBOOTSTRAP_DIR@@|${VBUILDER_VBOOTSTRAP_DIR}|g" \
  19. -e "s|@@VBUILDER_CACHE_DIR@@|${VBUILDER_CACHE_DIR}|g" \
  20. -e "s|@@VBUILDER_BUILT_RPMS_DIR@@|${VBUILDER_BUILT_RPMS_DIR}|g" \
  21. vbuilder.sh.in > vbuilder.sh
  22. sed -e "s/@@VBUILDER_DEFAULT_VERSION@@/${VBUILDER_DEFAULT_VERSION}/g" \
  23. -e "s/@@VBUILDER_CATEGORIES@@/${VBUILDER_CATEGORIES}/g" \
  24. -e "s|@@VBUILDER_VBOOTSTRAP_DIR@@|${VBUILDER_VBOOTSTRAP_DIR}|g" \
  25. -e "s|@@VBUILDER_CACHE_DIR@@|${VBUILDER_CACHE_DIR}|g" \
  26. -e "s|@@VBUILDER_BUILT_RPMS_DIR@@|${VBUILDER_BUILT_RPMS_DIR}|g" \
  27. vbuilder.conf.in > vbuilder.conf
  28. cd po && make
  29. install:
  30. install -d ${DESTDIR}/usr/share/vbootstrap/{scripts,sources.list.d}
  31. install -d ${DESTDIR}/usr/sbin
  32. install -d ${DESTDIR}/etc/vbootstrap
  33. install -d ${DESTDIR}/etc/bash_completion.d
  34. install -m 644 vbootstrap/scripts/* ${DESTDIR}/usr/share/vbootstrap/scripts/
  35. install -m 644 vbootstrap/sources.list.d/* ${DESTDIR}/usr/share/vbootstrap/sources.list.d
  36. install -m 755 vbootstrap.sh ${DESTDIR}/usr/sbin/vbootstrap
  37. install -m 755 vbuilder.sh ${DESTDIR}/usr/sbin/vbuilder
  38. install -m 644 vbuilder.conf ${DESTDIR}/etc/vbootstrap/vbuilder.conf
  39. install -m 644 vbuilder-bash-completion.sh ${DESTDIR}/etc/bash_completion.d/vbuilder
  40. cd po && make install DESTDIR=${DESTDIR}
  41. tarbz2: clean
  42. cd .. && rm -rf ${NAME}-${VERSION}
  43. cd .. && cp -arf trunk ${NAME}-${VERSION}
  44. cd .. && tar --exclude CVS --exclude .svn -cf - ${NAME}-${VERSION} | bzip2 -9 > ${NAME}-${VERSION}.tar.bz2
  45. @if [ -d ~/rpm/SOURCES/${NAME} ]; then \
  46. mv ../${NAME}-${VERSION}.tar.bz2 ~/rpm/SOURCES/${NAME}; \
  47. else \
  48. mv ../${NAME}-${VERSION}.tar.bz2 ~/rpm/SOURCES/; \
  49. fi
  50. rm -rf ${NAME}-${VERSION}
  51. rpm: tarbz2
  52. rpmbuild -ba ${NAME}-vl.spec
  53. clean:
  54. rm -fr *~ .*???~ vbootstrap.sh vbuilder.sh vbuilder.conf
  55. find . -name *~ -exec rm -f {} \;
  56. cd po && make clean