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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatibility version to use.
export DH_COMPAT=2
export SHELL = /bin/bash
# make some files executable
dummy := $(shell chmod +x config.guess clean_cpu.sh clean_os.sh cpu.sh os.sh configure mkinstalldirs)
CC = gcc-3.0
pkg = gnustep-make
tmpdir = $(shell pwd)/debian/$(pkg)
prefix = usr/lib/GNUstep
library_combo = gnu-gnu-gnu
GS_HOST := $(shell ./config.sub `./config.guess`)
GS_CPU := $(shell ./clean_cpu.sh `./cpu.sh $(GS_HOST)`)
GS_OS := $(shell ./clean_os.sh `./os.sh $(GS_HOST)`)
lib_dir = $(GS_CPU)/$(GS_OS)
combo_dir = $(GS_CPU)/$(GS_OS)/$(library_combo)
V_OBJC = 1:3.0.4
build: stamp-build
stamp-build:
dh_testdir
sed -e 's/V_OBJC/$(V_OBJC)/g' debian/control.in > debian/control
CC=$(CC) ./configure \
--prefix=/$(prefix) \
--with-local-root=/usr/local/lib/GNUstep/Local \
--with-network-root=/usr/local/lib/GNUstep/Network \
--with-library-combo=$(library_combo)
$(MAKE)
$(MAKE) -C Documentation
touch stamp-build
clean:
dh_testdir
dh_testroot
rm -f stamp-build
: # configure, so that `make distclean' works
[ -f GNUmakefile ] || ./configure \
--prefix=/$(prefix) \
--with-local-root=/usr/local/lib/GNUstep/Local \
--with-network-root=/usr/local/lib/GNUstep/Network \
--with-library-combo=$(library_combo)
$(MAKE) -C Documentation distclean
rm -f Documentation/*.{aux,dvi,gz,info,html,log,ps,toc,vr,vrs}
rm -f Documentation/version.texi
rm -f Documentation/{ANNOUNCE,FAQ,GNUstep-HOWTO,INSTALL,NEWS,README}
$(MAKE) distclean
rm -f config.h
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install special_prefix=$(tmpdir)
$(MAKE) -C Documentation install \
prefix=$(tmpdir)/$(prefix)/System
dh_link \
/$(prefix)/System/Documentation/Developer /usr/share/doc/$(pkg)/Developer \
/$(prefix)/System/Documentation/User /usr/share/doc/$(pkg)/User
rm -rf $(tmpdir)/$(prefix)/System/Documentation/Developer/Make/ReleaseNotes
rm -f $(tmpdir)/$(prefix)/System/share/config.site
-rmdir $(tmpdir)/$(prefix)/System/share
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
# according to policy manual 10.1.2 --> postinst/prerm
rm -rf $(tmpdir)/usr/local
# dh_link /usr/local/lib/GNUstep/Local /usr/lib/GNUstep/Local
# dh_link /usr/local/lib/GNUstep/Network /usr/lib/GNUstep/Network
# override lintian warnings
mkdir -p $(tmpdir)/usr/share/lintian/overrides
cp -p debian/overrides $(tmpdir)/usr/share/lintian/overrides/$(pkg)
# dh_installdebconf
dh_installdocs debian/README.Debian Documentation/DESIGN \
Documentation/{ANNOUNCE,FAQ,GNUstep-HOWTO,NEWS,README}
dh_installexamples
# dh_installmime
# dh_undocumented
dh_installchangelogs ChangeLog
dh_strip
dh_compress
dh_fixperms
sed 's,@GSCOMBODIR@,/$(prefix)/System/Libraries/$(combo_dir),' \
debian/postinst.in > debian/$(pkg).postinst
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|