NAME=vbootstrap VERSION=$(shell awk '/%define version/ { print $$3 }' ${NAME}-vl.spec) REVISION=$(shell LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2) VBUILDER_STABLE_VERSION=6.5 VBUILDER_DEFAULT_VERSION=VineSeed VBUILDER_CATEGORIES=main,plus,nonfree VBUILDER_VBOOTSTRAP_FETCH_URL=http://updates.vinelinux.org/apt VBUILDER_VBOOTSTRAP_DIR=/var/local/vbootstrap VBUILDER_UNIONFS_DIR=/var/local/vbootstrap/unionfs VBUILDER_CACHE_DIR=/var/local/vbootstrap/cache VBUILDER_BUILT_RPMS_DIR=$$\{HOME\}/rpm/vbuilder DESTDIR= all: sed -e "s/@@VBOOTSTRAP_VERSION@@/${VERSION}/g" \ vbootstrap.sh.in > vbootstrap.sh for i in vbuilder.sh.in vbuilder.conf.in libvbuilder.sh.in; do \ sed -e "s/@@VBUILDER_VERSION@@/${VERSION}/g" \ -e "s/@@VBUILDER_REVISION@@/${REVISION}/g" \ -e "s/@@VBUILDER_STABLE_VERSION@@/${VBUILDER_STABLE_VERSION}/g" \ -e "s/@@VBUILDER_DEFAULT_VERSION@@/${VBUILDER_DEFAULT_VERSION}/g" \ -e "s|@@VBUILDER_VBOOTSTRAP_FETCH_URL@@|${VBUILDER_VBOOTSTRAP_FETCH_URL}|g" \ -e "s/@@VBUILDER_CATEGORIES@@/${VBUILDER_CATEGORIES}/g" \ -e "s|@@VBUILDER_VBOOTSTRAP_DIR@@|${VBUILDER_VBOOTSTRAP_DIR}|g" \ -e "s|@@VBUILDER_UNIONFS_DIR@@|${VBUILDER_UNIONFS_DIR}|g" \ -e "s|@@VBUILDER_CACHE_DIR@@|${VBUILDER_CACHE_DIR}|g" \ -e "s|@@VBUILDER_BUILT_RPMS_DIR@@|${VBUILDER_BUILT_RPMS_DIR}|g" \ $$i > `basename $$i .in`; \ done ##!! experimental: vchroot cp -f vchroot.sh.in vchroot.sh cd po && make install: install -d ${DESTDIR}/usr/share/vbootstrap/{scripts,sources.list.d} install -d ${DESTDIR}/usr/bin install -d ${DESTDIR}/usr/sbin install -d ${DESTDIR}/etc/vbootstrap/profile.d install -d ${DESTDIR}/etc/security/console.apps install -d ${DESTDIR}/etc/pam.d install -d ${DESTDIR}/etc/bash_completion.d for sh in vbootstrap/scripts/*.sh; do \ inst_sh=`basename $$sh .sh`; \ install -m 644 $$sh ${DESTDIR}/usr/share/vbootstrap/scripts/$$inst_sh; \ done install -m 644 vbootstrap/sources.list.d/* ${DESTDIR}/usr/share/vbootstrap/sources.list.d install -m 755 vbootstrap.sh ${DESTDIR}/usr/sbin/vbootstrap install -m 755 vbuilder.sh ${DESTDIR}/usr/sbin/vbuilder install -m 644 vbuilder.conf ${DESTDIR}/etc/vbootstrap/vbuilder.conf install -m 644 sample.conf.skip ${DESTDIR}/etc/vbootstrap/profile.d/sample.conf.skip cd ${DESTDIR}/usr/bin && ln -sf consolehelper vbuilder install -m 644 vbuilder.console ${DESTDIR}/etc/security/console.apps/vbuilder install -m 644 vbuilder.pamd ${DESTDIR}/etc/pam.d/vbuilder install -m 644 vbuilder-bash-completion.sh ${DESTDIR}/etc/bash_completion.d/vbuilder ##!! experimental: vchroot install -m 644 libvbuilder.sh ${DESTDIR}/usr/share/vbootstrap/libvbuilder.sh install -m 755 vchroot.sh ${DESTDIR}/usr/sbin/vchroot cd po && make install DESTDIR=${DESTDIR} tarbz2: clean cd .. && rm -rf ${NAME}-${VERSION} cd .. && cp -arf trunk ${NAME}-${VERSION} cd .. && tar --exclude CVS --exclude .svn -cf - ${NAME}-${VERSION} | bzip2 -9 > ${NAME}-${VERSION}.tar.bz2 @if [ -d ~/rpm/SOURCES/${NAME} ]; then \ mv ../${NAME}-${VERSION}.tar.bz2 ~/rpm/SOURCES/${NAME}; \ else \ mv ../${NAME}-${VERSION}.tar.bz2 ~/rpm/SOURCES/; \ fi rm -rf ${NAME}-${VERSION} tarxz: git archive HEAD --prefix=${NAME}-${VERSION}/ --output=../${NAME}-${VERSION}.tar.xz @if [ -d ~/rpm/SOURCES/${NAME} ]; then \ mv ../${NAME}-${VERSION}.tar.xz ~/rpm/SOURCES/${NAME}; \ else \ mv ../${NAME}-${VERSION}.tar.xz ~/rpm/SOURCES/; \ fi rpm: tarxz rpmbuild -ba ${NAME}-vl.spec srpm: tarxz rpmbuild -bs ${NAME}-vl.spec clean: rm -fr *~ .*???~ vbootstrap.sh vbuilder.sh vbuilder.conf find . -name *~ -exec rm -f {} \; ##!! experimental: vchroot rm -f vchroot.sh libvbuilder.sh cd po && make clean