source: projects/vbootstrap/tags/0.0.35/Makefile @ 2537

Revision 2537, 2.9 KB checked in by munepi, 13 years ago (diff)

re-tagging 0.0.35

RevLine 
[118]1NAME=vbootstrap
[629]2VERSION=$(shell awk '/%define version/ { print $$3 }' ${NAME}-vl.spec)
[710]3REVISION=$(shell LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2)
[118]4
[2270]5VBUILDER_STABLE_VERSION=5.2
[370]6VBUILDER_DEFAULT_VERSION=VineSeed
[791]7VBUILDER_CATEGORIES=main,plus,nonfree
[323]8VBUILDER_VBOOTSTRAP_DIR=/var/local/vbootstrap
[725]9#VBUILDER_CACHE_DIR=$$\{VBOOTSTRAP_DIR\}/cache
10VBUILDER_CACHE_DIR=/var/local/vbootstrap/cache
[370]11VBUILDER_BUILT_RPMS_DIR=$$\{HOME\}/rpm/vbuilder
[323]12
[118]13DESTDIR=
14
15all:
[2517]16        sed -e "s/@@VBOOTSTRAP_VERSION@@/${VERSION}/g" \
17                vbootstrap.sh.in > vbootstrap.sh
[411]18        sed -e "s/@@VBUILDER_STABLE_VERSION@@/${VBUILDER_STABLE_VERSION}/g" \
19            -e "s/@@VBUILDER_DEFAULT_VERSION@@/${VBUILDER_DEFAULT_VERSION}/g" \
[791]20            -e "s/@@VBUILDER_CATEGORIES@@/${VBUILDER_CATEGORIES}/g" \
[323]21            -e "s|@@VBUILDER_VBOOTSTRAP_DIR@@|${VBUILDER_VBOOTSTRAP_DIR}|g" \
[725]22            -e "s|@@VBUILDER_CACHE_DIR@@|${VBUILDER_CACHE_DIR}|g" \
[370]23            -e "s|@@VBUILDER_BUILT_RPMS_DIR@@|${VBUILDER_BUILT_RPMS_DIR}|g" \
[323]24                vbuilder.sh.in > vbuilder.sh
25        sed -e "s/@@VBUILDER_DEFAULT_VERSION@@/${VBUILDER_DEFAULT_VERSION}/g" \
[791]26            -e "s/@@VBUILDER_CATEGORIES@@/${VBUILDER_CATEGORIES}/g" \
[323]27            -e "s|@@VBUILDER_VBOOTSTRAP_DIR@@|${VBUILDER_VBOOTSTRAP_DIR}|g" \
[725]28            -e "s|@@VBUILDER_CACHE_DIR@@|${VBUILDER_CACHE_DIR}|g" \
[370]29            -e "s|@@VBUILDER_BUILT_RPMS_DIR@@|${VBUILDER_BUILT_RPMS_DIR}|g" \
[323]30                vbuilder.conf.in > vbuilder.conf
[118]31
[2517]32        cd po && make
33
[118]34install:
35        install -d ${DESTDIR}/usr/share/vbootstrap/{scripts,sources.list.d}
[2537]36        install -d ${DESTDIR}/usr/bin
[118]37        install -d ${DESTDIR}/usr/sbin
[323]38        install -d ${DESTDIR}/etc/vbootstrap
[2532]39        install -d ${DESTDIR}/etc/security/console.apps
40        install -d ${DESTDIR}/etc/pam.d
[484]41        install -d ${DESTDIR}/etc/bash_completion.d
[2526]42        for sh in vbootstrap/scripts/*.sh; do \
43          inst_sh=`basename $$sh .sh`; \
44          install -m 644 $$sh ${DESTDIR}/usr/share/vbootstrap/scripts/$$inst_sh; \
45        done
[118]46        install -m 644 vbootstrap/sources.list.d/* ${DESTDIR}/usr/share/vbootstrap/sources.list.d
47        install -m 755 vbootstrap.sh ${DESTDIR}/usr/sbin/vbootstrap
48        install -m 755 vbuilder.sh ${DESTDIR}/usr/sbin/vbuilder
[323]49        install -m 644 vbuilder.conf ${DESTDIR}/etc/vbootstrap/vbuilder.conf
[2537]50        cd ${DESTDIR}/usr/bin && ln -sf consolehelper vbuilder
[2532]51        install -m 644 vbuilder.console ${DESTDIR}/etc/security/console.apps/vbuilder
52        install -m 644 vbuilder.pamd ${DESTDIR}/etc/pam.d/vbuilder
[484]53        install -m 644 vbuilder-bash-completion.sh ${DESTDIR}/etc/bash_completion.d/vbuilder
[118]54
[2517]55        cd po && make install DESTDIR=${DESTDIR}
56
[118]57tarbz2: clean
58        cd .. && rm -rf ${NAME}-${VERSION}
[296]59        cd .. && cp -arf trunk ${NAME}-${VERSION}
[304]60        cd .. && tar --exclude CVS --exclude .svn -cf - ${NAME}-${VERSION} | bzip2 -9 > ${NAME}-${VERSION}.tar.bz2
61        @if [ -d ~/rpm/SOURCES/${NAME} ]; then \
62                mv ../${NAME}-${VERSION}.tar.bz2 ~/rpm/SOURCES/${NAME}; \
63        else \
64                mv ../${NAME}-${VERSION}.tar.bz2 ~/rpm/SOURCES/; \
65        fi
[118]66        rm -rf ${NAME}-${VERSION}
67
68rpm: tarbz2
[629]69        rpmbuild -ba ${NAME}-vl.spec
[118]70
71clean:
[323]72        rm -fr *~ .*???~ vbootstrap.sh vbuilder.sh vbuilder.conf
[2324]73        find . -name *~ -exec rm -f {} \;
[2517]74
75        cd po && make clean
Note: See TracBrowser for help on using the repository browser.