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
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=3
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ARCH := $(shell dpkg --print-architecture)
TARGETS := ogle
ifeq "$(ARCH)" "i386"
TARGETS += ogle-mmx
endif
ifeq "$(ARCH)" "powerpc"
TARGETS += ogle-altivec
endif
#ifeq "$(ARCH)" "sparc"
#TARGETS += ogle-sparcasm
#endif
ogle-%:
@echo Building $@
dh_installdirs -s
-$(MAKE) clean
./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
--prefix=/usr --mandir=\$${prefix}/share/man \
--sysconfdir=\$${prefix}/etc \
$(if $(findstring ogle-noopt,$@),--disable-altivec --disable-mmx)
$(MAKE)
$(MAKE) install DESTDIR=$(CURDIR)/debian/$@ \
LIBRARY_PATH=$(CURDIR)/debian/$@/usr/lib/ogle
mkdir -p debian/$@/etc
mv debian/$@/usr/share/ogle/oglerc debian/$@/etc/oglerc
ln -sf /etc/oglerc debian/$@/usr/share/ogle/oglerc
install -m 644 debian/ogle.xpm debian/$@/usr/share/ogle/ogle.xpm
cd debian; \
for f in config docs manpages postinst; do\
ln -fs ogle.$$f $@.$$f; \
done
touch $@
ogle: ogle-stamp
:
ogle-stamp: ogle-noopt
$(RM) -r debian/$(patsubst %-stamp,%,$@)
mv debian/$^ debian/$(patsubst %-stamp,%,$@)
touch $@
configure-noopt-stamp:
@echo Configure $@
$(RM) configure-*-stamp
-$(MAKE) clean
./configure --prefix=/usr --mandir=\$${prefix}/share/man \
--sysconfdir=\$${prefix}/etc --disable-altivec --disable-mmx
touch $@
configure-mmx-stamp configure-altivec-stamp configure-sparcasm-stamp:
@echo Configure $@
$(RM) configure-*-stamp
-$(MAKE) clean
./configure --prefix=/usr --mandir=\$${prefix}/share/man \
--sysconfdir=\$${prefix}/etc
touch $@
build:
clean:
dh_testdir
dh_testroot
$(RM) ogle-*
$(RM) configure-*-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
$(RM) -r debian/ogle-noopt
dh_clean
# Build architecture-independent files here.
binary-indep: build
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build $(TARGETS)
dh_testdir
dh_testroot
dh_installdebconf -s
dh_installdocs -A -s
dh_installexamples -A -s debian/install-css.sh
dh_installmenu -s
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
dh_installman -s
# dh_installinfo
# dh_undocumented
dh_installchangelogs -s ChangeLog
# dh_link
dh_strip -s
dh_compress -s
dh_fixperms -s
dh_makeshlibs -s --noscripts -V 'ogle'
dh_installdeb -s
# dh_perl
dh_shlibdeps -s
cd debian; touch ogle-mmx.substvars ogle-altivec.substvars \
ogle-sparcasm.substvars; \
sed -e s,ogle,ogle-mmx, < ogle-mmx.substvars > ogle-mmx.substvars.new; \
mv ogle-mmx.substvars.new ogle-mmx.substvars; \
sed -e s,ogle,ogle-altivec, < ogle-altivec.substvars > ogle-altivec.substvars.new ; \
mv ogle-altivec.substvars.new ogle-altivec.substvars; \
sed -e s,ogle,ogle-sparcasm, < ogle-sparcasm.substvars > ogle-sparcasm.substvars.new; \
mv ogle-sparcasm.substvars.new ogle-sparcasm.substvars
dh_gencontrol -s
dh_md5sums -s
dh_builddeb -s
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|