# # Copyright (C) 2006 Mekensleep # # Mekensleep # 24 rue vieille du temple # 75004 Paris # licensing@mekensleep.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # # Authors: # Loic Dachary # : ${GPGKEY:=497A176D} PACKAGING_FARM_LIBDIR=/home/loic/local/ports/packaging-farm/packaging-farm/lib all: sync archive dupmerge link-sources upload # # Prompt the user for upload to Debian unstable # official: for package in unittest++ xwnc openscenegraph openalpp-cvs osgal-cvs osgcal ; do \ ${MAKE} sign/$$package ; \ bin/official-debian $$package ; \ done # # Submit a freshmeat entry # RELEASE_FOCUS=Minor bugfixes FRESHMEAT_DRY_RUN = -N GET_NEWS=$$(wget -q -O - "http://cvs.gna.org/cvsweb/$$package/NEWS?rev=HEAD;content-type=text%2Fplain;cvsroot=$$cvsroot" | perl -ne "if((/^Release $$version/ .. /^Release/ && !/^Release $$version/) && !/^Release/ && !/^\s*$$/) { s/\.$$//; s/\n/. /sg; print; }" ) GET_VERSION=$$(expr $$package/gnulinux/debian/unstable/src/$$package*.diff.gz : '.*_\(.*\)-.*.diff.gz') # # It won't work unless ~/.netrc has the proper id/password # # echo machine freshmeat login $mylogin password $mypassword > ~/.netrc # freshmeat/unittest++: cvsroot=underware ; \ package=${@F} ; \ version=${GET_VERSION} ; \ changes=${GET_NEWS} ; \ bin/freshmeat-submit ${FRESHMEAT_DRY_RUN} -nV --project=$$package --branch=Default --version="$$version" --changes="$$changes" --license='GNU General Public License (GPL)' --gzipped-tar-url=http://download.gna.org/$$cvsroot/sources/$$package-$$version.tar.gz --release-focus="${RELEASE_FOCUS}" DRY = --dry-run # # When the local directory is up to date (sync + archive + dupmerge), upload # somewhere on the internet. # upload: [ "${GPG_PASSWORD}" ] if [ ! -f SIG_STONE ] ; then touch -t 200001011010 SIG_STONE ; fi find * \( -type f -a -newer SIG_STONE \) | grep -v '\.sig$$' | while read file ; do \ rm -f $$file.sig ; \ echo $$file ; \ echo ${GPG_PASSWORD} | gpg --quiet --command-fd 0 --detach $$file > /dev/null 2>&1; \ done sleep 1 touch SIG_STONE rsync ${DRY} ${BWLIMIT} --delete --delete-excluded --exclude='var/cache/yum/' --exclude='/farms' --exclude '*.tmp' --exclude='*~' -avH -z * ./ download.gna.org:/upload/underware/ # # Avoid file duplication by merging identical files with hard links # dupmerge: perl ${PACKAGING_FARM_LIBDIR}/faster-dupmerge ${DRY} --find ! -name '*.sig' -- . FARM_HOST=farm-poker3d #FARM_HOST=mekensleep.com:21873 PACKAGES=nprofile unittest++ blender xwnc openscenegraph openalpp-cvs osgal-cvs cal3d osgcal poker3d underware # # Copy the current packaging-farm results # sync: $(patsubst %,sync/%,${PACKAGES}) rsync ${BWLIMIT} ${DRY} --exclude '*.sig' --delete -avH -z rsync://${FARM_HOST}/packaging-farm/html/ html/ $(patsubst %,sync/%,${PACKAGES}): rsync ${BWLIMIT} ${DRY} --exclude '*.sig' --delete -avH -z rsync://${FARM_HOST}/packaging-farm/${@F}/ ${@F}/ # # Archive the current packaging-farm results and # the source / binaries available in the official repositories. # archive archives: $(patsubst %,archives/%,${PACKAGES}) $(patsubst %,archives/%,${PACKAGES}): archives/% : official/% rsync --exclude '*.sig' ${DRY} -avH ${@F}/ archives/${@F}/ .PHONY: $(patsubst %,archives/%,${PACKAGES}) WGET_DIR=wget --quiet --timestamping --no-directories --no-host-directories --recursive --level=1 define OFFICIAL official/${1}:: $(patsubst %,official/${1}/archives/%,${2}) $(patsubst %,official/${1}/archives/%,${2}):: cd archives/${1}/*/*/$${@F} && mkdir -p official && cd official && ${PACKAGING_FARM_LIBDIR}/$$$$(packaging-farm --var DISTRIBUTION=$${@F} DISTTYPE)/official-op.sh -d $${@F} archive ${1} endef $(eval $(call OFFICIAL,nprofile,)) $(eval $(call OFFICIAL,unittest++,unstable)) $(eval $(call OFFICIAL,blender,)) $(eval $(call OFFICIAL,xwnc,unstable)) $(eval $(call OFFICIAL,openthreads,)) $(eval $(call OFFICIAL,producer,)) $(eval $(call OFFICIAL,openscenegraph,unstable edgy)) $(eval $(call OFFICIAL,openalpp-cvs,unstable edgy)) $(eval $(call OFFICIAL,osgal-cvs,unstable edgy)) $(eval $(call OFFICIAL,cal3d,)) $(eval $(call OFFICIAL,osgcal,unstable edgy)) $(eval $(call OFFICIAL,poker3d,)) $(eval $(call OFFICIAL,underware,)) # # Sign or update all packages in Debian unstable # sign: $(patsubst %,sign/%,${PACKAGES}) $(patsubst %,sign/%,${PACKAGES}): debsign -k${GPGKEY} ${@F}/gnulinux/debian/unstable/src/*.changes # # Maintain shorter names for all source tarballs ever published # in Debian unstable # UNOFFICIAL_PACKAGES = {nprofile,poker3d} link-sources: cd sources ; \ for file in ../archives/*/gnulinux/debian/unstable/official/*.orig.tar.gz ../archives/${UNOFFICIAL_PACKAGES}/gnulinux/debian/unstable/src/*.orig.tar.gz ; do \ base=$$(basename $$file) ; \ other=$$(echo $$base | sed -e 's/_/-/' -e 's/\.orig//') ; \ rm -f $$other ; \ ln -s $$file $$other ; \ done