perlenv = PERL5LIB=../debian/perl5
endif
+PKG_VERSION = $(shell dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p')
build: build-stamp
-build-stamp: doc/carnet-upgrade.sgml
+build-stamp: doc/carnet-upgrade-src.sgml
dh_testdir
+ # Update package version in documentation
+ sed -e 's/%PKG_VERSION%/$(PKG_VERSION)/g' doc/carnet-upgrade-src.sgml \
+ > doc/carnet-upgrade.sgml
+
# Build txt docs
(cd doc; $(perlenv) debiandoc2text -l hr_HR.UTF-8 carnet-upgrade.sgml)
rm -f build-stamp
# Clean up after the build process.
- rm -rf doc/carnet-upgrade.{txt,html,pdf,tpt}
+ rm -rf doc/carnet-upgrade.{txt,html,pdf,tpt,sgml}
dh_clean
dh_installdocs
dh_installexamples
dh_install
+ # Update package version in source
+ sed -i -e 's/%PKG_VERSION%/$(PKG_VERSION)/g' \
+ debian/carnet-upgrade/usr/share/carnet-upgrade/cn-upgrade
+ # Remove documentation template
+ rm -f debian/carnet-upgrade/usr/share/doc/carnet-upgrade/carnet-upgrade-src.sgml
# dh_installmenu
dh_installdebconf
# dh_installlogrotate
<name>Grupa za izradu paketa</name>
<email>paketi@carnet.hr</email>
</author>
- <version>Verzija 4.0.6</version>
+ <version>Verzija %PKG_VERSION%</version>
<abstract>
CARNet Debian <em>etch</em> je treća generacija CARNet Debian
# last update: 2005-01-07
# Zoran 'jelly' Dzelajlija <jelly@srce.hr>
# Ivan 'ico' Rako <irako@srce.hr>
-version="4.0.6"
+version="%PKG_VERSION%"
# restart upgrade under script for logging purposes
if [ "$1" == "--no-script" ]; then