1AUTOMAKE_OPTIONS = 1.6 2 3SUBDIRS = src test 4 5EXTRA_DIST = doc license \ 6 build.bat build_d.bat makefile.vc7 makefile.vc8 \ 7 README 8 9pkgconfigdir = $(libdir)/pkgconfig 10pkgconfig_DATA = silgraphite.pc 11 12$(pkgconfig_DATA): config.status 13 14dist-hook: 15 find $(distdir) -name .svn | xargs rm -rf 16 17# VC_VERSION is the last released version of the software 18VC_VERSION = 2.3.1 19# D_VERSION gets the number of the current svn revision 20D_VERSION = `svnversion ${top_srcdir}|sed -e "s/[0-9]*\://g"` 21SVNDEB_VERSION = $(VC_VERSION)+0$(D_VERSION)svn 22SVNDEBPACKAGE = silgraphite2.0-$(SVNDEB_VERSION) 23SVNORIGTAR = silgraphite2.0_$(SVNDEB_VERSION).orig.tar.gz 24SVNWITH_EPOCH = 1:$(SVNDEB_VERSION)-1 25 26DEB_VERSION = $(VC_VERSION) 27DEBPACKAGE = silgraphite2.0-$(DEB_VERSION) 28ORIGTAR = silgraphite2.0_$(DEB_VERSION).orig.tar.gz 29WITH_EPOCH = 1:$(DEB_VERSION)-1 30 31DISTRIB_CODENAME ?= ${REL_CODENAME} 32 33showcodename: 34 echo "Codename: ${DISTRIB_CODENAME}" 35 36deb-base: dist 37 rm -rf silgraphite2.0* 38 mkdir -p ${SVNDEBPACKAGE} 39 cp ${PACKAGE}-${VERSION}.tar.gz $(SVNDEBPACKAGE) 40 tar cfz $(SVNORIGTAR) $(SVNDEBPACKAGE) 41 cp -a ${top_srcdir}/debian $(SVNDEBPACKAGE) 42 cd ${SVNDEBPACKAGE} && find . -name .svn | xargs rm -rf 43 44# make deb builds an interim deb from svn source for release 45deb: deb-base 46 dch -D ${DISTRIB_CODENAME} -v ${SVNWITH_EPOCH} -m -c${SVNDEBPACKAGE}/debian/changelog 47 cd ${SVNDEBPACKAGE} && pdebuild 48 49# make deb-binary-only builds a binary only deb from svn source 50deb-binary-only: deb-base 51 dch -D ${DISTRIB_CODENAME} -v ${SVNWITH_EPOCH} -m -c${SVNDEBPACKAGE}/debian/changelog "This is build direct from svn" 52 cd ${SVNDEBPACKAGE} && pdebuild --debbuildopts -i --debbuildopts -b 53 54# make deb-release builds a deb for a released version number 55deb-release: deb-base 56 dch -D ${DISTRIB_CODENAME} -v ${WITH_EPOCH} -c${DEBPACKAGE}/debian/changelog 57 cd ${DEBPACKAGE} && pdebuild 58 59# make deb-local uses debuild to build a deb for local use only 60deb-local: deb-base 61 dch -D ${DISTRIB_CODENAME} -v ${SVNWITH_EPOCH} -m -c${SVNDEBPACKAGE}/debian/changelog "This is a debuild direct from svn" 62 cd ${SVNDEBPACKAGE} && debuild -us -uc 63