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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=prc-tools
export DESTDIR=$(shell pwd)/debian/tmp
export INSTDIR=$(shell pwd)/debian/tmp/usr
ANAME=m68k-palmos-coff
GVER=2.7.2.2-kgpd-071097
# export PATH=$(PATH):$(DESTDIR)/usr/bin
build:
$(checkdir)
# make CFLAGS="-O2 -g -Wall"
-mkdir othersources
install -d debian/tmp
cd debian/tmp && install -d `cat ../dirs`
make gnuuntar
make patch
make gnutools
make all
# cd example; make clean; cd ..
touch build
clean:
$(checkdir)
-rm -f build
-make clean
-rm -f `find . -name "*~"`
-rm -rf debian/tmp debian/files* core debian/substvars
-rm -rf stamp.*
-rm -rf othersources
-cd othersources/binutils-2.7; make distclean
-cd othersources/gdb-4.16; make distclean
-cd othersources/gcc-2.7.2.2; make distclean
binary-indep: checkroot build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: checkroot build
$(checkdir)
make install prefix=$(DESTDIR)/usr \
PREFIX=$(DESTDIR)/usr DESTDIR=
# Must have debmake installed for this to work. Otherwise please copy
# /usr/bin/debstd into the debian directory and change debstd to debian/debstd
#
# The usr/include and usr/info duplicate the files in other
# packages. Make sure they don't end up here.
#
rm -rv debian/tmp/usr/include debian/tmp/usr/info
#
# libiberty.a conflicts with another file
#
rm debian/tmp/usr/lib/libiberty.a
#
# Pilrc has been split off into a separate package. Delete.
#
cd debian/tmp; rm -rv usr/bin/pilrc \
usr/man/man1/pilrc.* usr/m68k-palmos-coff/bin/pilrc; \
cd ../..
#
# For some reason, libreadline.a and libmmalloc.a are installed
# into usr/lib. Delete.
#
rm debian/tmp/usr/lib/{libreadline.a,libmmalloc.a}
# Install the examples
cp -rv example/* debian/tmp/usr/doc/prc-tools/examples
# cp -rv pilrc*/readme.txt pilrc*/doc/* \
# debian/tmp/usr/doc/$(package)/pilrc
# cp -rv man/* debian/tmp/usr/man/man1
#
# Delete the othersources area so debstd doesn't find
# and try to install manpages from there.
-rm -rf othersources
# debstd corrupts libgcc.a, so back it up.
#
cp debian/tmp/usr/lib/gcc-lib/$(ANAME)/$(GVER)/libgcc.a \
debian/tmp
debstd README README.reloc README.shared
#
# Restore backed-up libgcc.a
#
cp debian/tmp/libgcc.a debian/tmp/usr/lib/gcc-lib/$(ANAME)/$(GVER)
rm debian/tmp/libgcc.a
#
# Unzip the examples
#
gunzip debian/tmp/usr/doc/prc-tools/examples/*.gz
dpkg-gencontrol
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f debian/rules
endef
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|