Makefile 1.0 KB

123456789101112131415161718192021222324252627282930
  1. NAME=vbootstrap
  2. VERSION=$(shell awk '/%define version/ { print $$3 }' ${NAME}.spec)
  3. DEFAULT_VERSION=VineSeed
  4. DESTDIR=
  5. all:
  6. sed -e "s/@@VBOOTSTRAP_VERSION@@/${VERSION}/g" vbootstrap.sh.in > vbootstrap.sh
  7. sed -e "s/@@DEFAULT_VERSION@@/${DEFAULT_VERSION}/g" vbuilder.sh.in > vbuilder.sh
  8. install:
  9. install -d ${DESTDIR}/usr/share/vbootstrap/{scripts,sources.list.d}
  10. install -d ${DESTDIR}/usr/sbin
  11. install -m 644 vbootstrap/scripts/* ${DESTDIR}/usr/share/vbootstrap/scripts/
  12. install -m 644 vbootstrap/sources.list.d/* ${DESTDIR}/usr/share/vbootstrap/sources.list.d
  13. install -m 755 vbootstrap.sh ${DESTDIR}/usr/sbin/vbootstrap
  14. install -m 755 vbuilder.sh ${DESTDIR}/usr/sbin/vbuilder
  15. tarbz2: clean
  16. cd .. && rm -rf ${NAME}-${VERSION}
  17. cd .. && cp -arf ${NAME} ${NAME}-${VERSION}
  18. cd .. && tar --exclude CVS -cf - ${NAME}-${VERSION} | bzip2 -9 > ${NAME}-${VERSION}.tar.bz2
  19. mv ../${NAME}-${VERSION}.tar.bz2 ~/rpm/SOURCES/
  20. rm -rf ${NAME}-${VERSION}
  21. rpm: tarbz2
  22. rpm -ba ${NAME}.spec
  23. clean:
  24. rm -fr *~ .*???~ vbootstrap.sh