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
|
#!/usr/bin/make -f
# 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.)
# This file may have to be extensively modified
#
# Modified to be a prototype for debmake by Christoph Lameter <clameter@debian.org>
package=mc
prefix=$(shell expr `pwd`/debian/tmp)
gmc-prefix=$(shell expr `pwd`/debian/gmc)
build:
$(checkdir)
CFLAGS="-O2 -g -Wall" ./configure --with-ext2undel --disable-nls --prefix=/usr
make
touch build
clean:
$(checkdir)
-rm -f build
-make distclean
-rm `find . -name "*~"`
-rm -rf $(prefix) $(gmc-prefix) debian/files* debian/substvars nohup.out core po/Makefile po/Makefile.in po/POTFILES
-rm gnome/gmc
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.
# This is for mc....
binary-arch: checkroot build
package=mc
$(checkdir)
-rm -rf $(prefix)
make install DESTDIR=$(prefix)
install -d -g root -m 755 -o root $(prefix)/etc
install -d -g root -m 755 -o root $(prefix)/etc/mc
install -d -g root -m 755 -o root $(prefix)/usr
install -d -g root -m 755 -o root $(prefix)/usr/doc/
install -d -g root -m 755 -o root $(prefix)/usr/doc/mc
( cd $(prefix)/usr/lib/mc ; \
mv mc.ext mc.menu mc.lib ../../../etc/mc )
install -g root -m 644 -o root debian/addons/mc.* $(prefix)/etc/mc/
rm -f $(prefix)/usr/lib/mc/FAQ
rm -f $(prefix)/usr/bin/mcedit
cp src/ChangeLog $(prefix)/usr/doc/mc/changelog
cp intl/ChangeLog $(prefix)/usr/doc/mc/changelog_intl
cp pc/ChangeLog $(prefix)/usr/doc/mc/changelog_pc
cp vfs/ChangeLog $(prefix)/usr/doc/mc/changelog_vfs
ln -s /etc/mc/mc.ext $(prefix)/usr/lib/mc/mc.ext
rm -rf $(prefix)/usr/doc/mc/README.edit
gzip -9 $(prefix)/usr/doc/mc/changelog_*
cp -a $(prefix) $(gmc-prefix)
rm -rf $(prefix)/usr/bin/gmc
rm -rf $(prefix)/usr/share/icons
# Must have debmake installed for this to work. Otherwise please copy
# /usr/bin/debstd into the debian directory and change debstd to debian/debstd
debstd -u
rm -f $(prefix)/usr/doc/mc/ChangeLog.gz
rm $(gmc-prefix)/usr/man/man1/mcmfmt.1.gz
cp -a $(prefix)/usr/man/man1/mcmfmt.1.gz $(gmc-prefix)/usr/man/man1/mcmfmt.1.gz
rm -rf $(gmc-prefix)/usr/doc/mc
rm -rf $(gmc-prefix)/usr/doc/gmc
cp -a $(prefix)/usr/doc/mc $(gmc-prefix)/usr/doc/
mv $(gmc-prefix)/usr/doc/mc $(gmc-prefix)/usr/doc/gmc
dh_md5sums -P$(prefix) -p mc
dpkg-gencontrol -p$(package)
chown -R root.root $(prefix)
chmod -R go=rX $(prefix)
dpkg --build $(prefix) ..
dh_md5sums -P$(gmc-prefix) -p gmc
dpkg-gencontrol -p$(package)
chown -R root.root $(gmc-prefix)
chmod -R go=rX $(gmc-prefix)
dpkg --build $(gmc-prefix) ..
define checkdir
test -f debian/rules
endef
# 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 binary-arch binary-indep clean checkroot
|