12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- 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=5.1
- VBUILDER_DEFAULT_VERSION=VineSeed
- VBUILDER_CATEGORIES=main,plus,nonfree
- VBUILDER_VBOOTSTRAP_DIR=/var/local/vbootstrap
- #VBUILDER_CACHE_DIR=$$\{VBOOTSTRAP_DIR\}/cache
- 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
- sed -e "s/@@VBUILDER_STABLE_VERSION@@/${VBUILDER_STABLE_VERSION}/g" \
- -e "s/@@VBUILDER_DEFAULT_VERSION@@/${VBUILDER_DEFAULT_VERSION}/g" \
- -e "s/@@VBUILDER_CATEGORIES@@/${VBUILDER_CATEGORIES}/g" \
- -e "s|@@VBUILDER_VBOOTSTRAP_DIR@@|${VBUILDER_VBOOTSTRAP_DIR}|g" \
- -e "s|@@VBUILDER_CACHE_DIR@@|${VBUILDER_CACHE_DIR}|g" \
- -e "s|@@VBUILDER_BUILT_RPMS_DIR@@|${VBUILDER_BUILT_RPMS_DIR}|g" \
- vbuilder.sh.in > vbuilder.sh
- sed -e "s/@@VBUILDER_DEFAULT_VERSION@@/${VBUILDER_DEFAULT_VERSION}/g" \
- -e "s/@@VBUILDER_CATEGORIES@@/${VBUILDER_CATEGORIES}/g" \
- -e "s|@@VBUILDER_VBOOTSTRAP_DIR@@|${VBUILDER_VBOOTSTRAP_DIR}|g" \
- -e "s|@@VBUILDER_CACHE_DIR@@|${VBUILDER_CACHE_DIR}|g" \
- -e "s|@@VBUILDER_BUILT_RPMS_DIR@@|${VBUILDER_BUILT_RPMS_DIR}|g" \
- vbuilder.conf.in > vbuilder.conf
- install:
- install -d ${DESTDIR}/usr/share/vbootstrap/{scripts,sources.list.d}
- install -d ${DESTDIR}/usr/sbin
- install -d ${DESTDIR}/etc/vbootstrap
- install -d ${DESTDIR}/etc/bash_completion.d
- install -m 644 vbootstrap/scripts/* ${DESTDIR}/usr/share/vbootstrap/scripts/
- 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 vbuilder-bash-completion.sh ${DESTDIR}/etc/bash_completion.d/vbuilder
- 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}
- rpm: tarbz2
- rpmbuild -ba ${NAME}-vl.spec
- clean:
- rm -fr *~ .*???~ vbootstrap.sh vbuilder.sh vbuilder.conf
|