1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
#!/usr/bin/make -f
# Copyright (C) 2000 Anton Kirilov Zinoviev
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# My e-mail is anton@lml.bas.bg, zinoviev@fmi.uni-sofia.bg
SHELL = /bin/sh
package=trscripts
export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
build:
$(checkdir)
$(MAKE)
clean:
$(checkdir)
$(MAKE) clean
-rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
binary-indep: checkroot build
$(checkdir)
-rm -rf debian/tmp
install -d debian/tmp/DEBIAN
install -d debian/tmp/usr/share/doc/$(package)
cp debian/copyright debian/tmp/usr/share/doc/$(package)
cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog
gzip -9nv debian/tmp/usr/share/doc/$(package)/changelog
cp debian/README.Debian debian/tmp/usr/share/doc/$(package)/
cp README debian/tmp/usr/share/doc/$(package)/
install -d debian/tmp/usr/share/doc/$(package)/source
cp Makefile debian/tmp/usr/share/doc/$(package)/source
cp csets debian/tmp/usr/share/doc/$(package)/source
cp fallbacks debian/tmp/usr/share/doc/$(package)/source
cp gen_trcs debian/tmp/usr/share/doc/$(package)/source
chmod -x debian/tmp/usr/share/doc/$(package)/source/gen_trcs
cp gen_trbdf debian/tmp/usr/share/doc/$(package)/source
chmod -x debian/tmp/usr/share/doc/$(package)/source/gen_trbdf
cp xcsets debian/tmp/usr/share/doc/$(package)/source
install -d debian/tmp/usr/share/doc/$(package)/source/charmaps
cp charmaps/* debian/tmp/usr/share/doc/$(package)/source/charmaps/
install -d debian/tmp/usr/bin
$(MAKE) prefix=`pwd`/debian/tmp/usr mandir=`pwd`/debian/tmp/usr/share/man install
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R go=rX,u=rwX debian/tmp
find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
dpkg --build debian/tmp ..
define checkdir
test -f gen_trcs -a -f gen_trbdf -a -f debian/rules
endef
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|