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 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
|
#! /usr/bin/make -f
# -*- mode: makefile; -*-
#
# Debian rules for building libpaper (by Marco Pistore <pistore@di.unipi.it>),
# based on:
#
# Debian rules for building libpaper (by Yves Arrouye), based on:
#
# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself. (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
package=libpaper
version=1.0.3
arch:=$(shell dpkg --print-gnu-build-architecture)
# If your architecture needs libc5-compat support built,
# add it to this list
libc5-compat-archs=i486 m68k sparc
ifneq (,$(findstring $(arch), $(libc5-compat-archs)))
do-build-libc5 := build-libc5
do-binary-libc5 := binary-libc5
endif
build: $(do-build-libc5) build-libc6
build-libc6:
$(checkdir)
-rm -f build-libc?
-$(MAKE) -i distclean man3suffix=paper
./configure --prefix=/usr --datadir=/
$(MAKE) CC=gcc man3suffix=paper
touch build-libc6
build-libc5:
$(checkdir)
-rm -f build-libc?
-$(MAKE) -i distclean man3suffix=paper
./configure --prefix=/usr --datadir=/
$(MAKE) CC=/usr/$(arch)-linuxlibc1/bin/gcc man3suffix=paper
touch build-libc5
clean:
$(checkdir)
-rm -f build-libc?
-$(MAKE) -i distclean man3suffix=paper
-rm -f Makefile config.log *~
-rm -f lib/{Makefile,config.log,*~}
-rm -f src/{Makefile,config.log,*~}
-rm -rf debian/tmp-libc?
-rm -f debian/{files,substvars,*~}
binary-indep:
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-libc6: checkroot build-libc6
$(checkdir)
-rm -rf debian/tmp-libc6
install -d debian/tmp-libc6 debian/tmp-libc6/DEBIAN
$(MAKE) CC=gcc \
prefix=`pwd`/debian/tmp-libc6/usr \
datadir=`pwd`/debian/tmp-libc6/ \
man3suffix=paper install
rm -rf debian/tmp-libc6/etc
strip debian/tmp-libc6/usr/bin/paperconf
strip --strip-unneeded debian/tmp-libc6/usr/lib/libpaper.so.1.0.3
strip --strip-debug debian/tmp-libc6/usr/lib/libpaper.a
cp debian/shlibs-libc6 debian/tmp-libc6/DEBIAN/shlibs
cp debian/preinst-libc6 debian/tmp-libc6/DEBIAN/preinst
cp debian/postinst-libc6 debian/tmp-libc6/DEBIAN/postinst
cp debian/postrm-libc6 debian/tmp-libc6/DEBIAN/postrm
chmod 755 debian/tmp-libc6/DEBIAN/preinst
chmod 755 debian/tmp-libc6/DEBIAN/postinst
chmod 755 debian/tmp-libc6/DEBIAN/postrm
gzip -9vr debian/tmp-libc6/usr/man/*
install -d debian/tmp-libc6/usr/doc/$(package)g
cp debian/changelog debian/tmp-libc6/usr/doc/$(package)g/changelog.Debian
cp ChangeLog debian/tmp-libc6/usr/doc/$(package)g/changelog
install -d debian/tmp-libc6/usr/doc/$(package)g/examples
cp examples/* debian/tmp-libc6/usr/doc/$(package)g/examples
-gzip -9vr debian/tmp-libc6/usr/doc/$(package)g/*
cp debian/copyright debian/tmp-libc6/usr/doc/$(package)g/
dpkg-shlibdeps -pshlibs-libc6 lib/libpaper.so.1.0.3
dpkg-gencontrol -plibpaperg -Pdebian/tmp-libc6
chown -R root.root debian/tmp-libc6
chmod -R g-ws debian/tmp-libc6
dpkg --build debian/tmp-libc6 ..
binary-libc5: checkroot build-libc5
$(checkdir)
-rm -rf debian/tmp-libc5
install -d debian/tmp-libc5 debian/tmp-libc5/DEBIAN
cd src && $(MAKE) \
CC=/usr/$(arch)-linuxlibc1/bin/gcc \
prefix=`pwd`/../debian/tmp-libc5/usr/ \
datadir=`pwd`/../debian/tmp-libc5/ \
man3suffix=paper install
cd lib && $(MAKE) \
CC=/usr/$(arch)-linuxlibc1/bin/gcc \
prefix=`pwd`/../debian/tmp-libc5/usr/ \
libdir=`pwd`/../debian/tmp-libc5/usr/$(arch)-linuxlibc1/lib/ \
incdir=`pwd`/../debian/tmp-libc5/usr/$(arch)-linuxlibc1/include/ \
datadir=`pwd`/../debian/tmp-libc5/ \
man3suffix=paper install
strip debian/tmp-libc5/usr/bin/paperconf
strip --strip-unneeded debian/tmp-libc5/usr/$(arch)-linuxlibc1/lib/libpaper.so.1.0.3
strip --strip-debug debian/tmp-libc5/usr/$(arch)-linuxlibc1/lib/libpaper.a
install -d debian/tmp-libc5/{usr,usr/lib,usr/lib/libc5-compat,usr/doc,usr/doc/$(package)}
mv debian/tmp-libc5/usr/$(arch)-linuxlibc1/lib/{libpaper.so.1.0.3,libpaper.so.1} debian/tmp-libc5/usr/lib/libc5-compat
ln -fs ../../lib/libc5-compat/libpaper.so.1.0.3 debian/tmp-libc5/usr/$(arch)-linuxlibc1/lib/libpaper.so
cp debian/shlibs-libc5 debian/tmp-libc5/DEBIAN/shlibs
cp debian/preinst-libc5 debian/tmp-libc5/DEBIAN/preinst
cp debian/postinst-libc5 debian/tmp-libc5/DEBIAN/postinst
cp debian/postrm-libc5 debian/tmp-libc5/DEBIAN/postrm
chmod 755 debian/tmp-libc5/DEBIAN/preinst
chmod 755 debian/tmp-libc5/DEBIAN/postinst
chmod 755 debian/tmp-libc5/DEBIAN/postrm
cp debian/changelog debian/tmp-libc5/usr/doc/$(package)/changelog.Debian
cp ChangeLog debian/tmp-libc5/usr/doc/$(package)/changelog
-gzip -9v debian/tmp-libc5/usr/doc/$(package)/*
cp debian/copyright debian/tmp-libc5/usr/doc/$(package)/
dpkg-shlibdeps -pshlibs-libc5 lib/libpaper.so.1.0.3
dpkg-gencontrol -plibpaper -Pdebian/tmp-libc5
chown -R root.root debian/tmp-libc5
chmod -R g-ws debian/tmp-libc5
dpkg --build debian/tmp-libc5 ..
define checkdir
test -f lib/paper.c -a -f debian/rules
endef
binary-arch: $(do-binary-libc5) binary-libc6
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary clean checkroot
|