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
|
#!/usr/bin/make -f
# debian/rules for sidplay and associated packages, (C) 1998 by ujr.
# Made using the sample rules from debhelper [GNU copyrighted by Joey Hess].
## Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
## Uncomment this to see what should happen.
#export DH_NO_ACT=1
build: build-stamp
build-stamp:
# to run 'make depend' is no longer necessary, because ./configure already does it
dh_testdir debian/rules libsidplay console sidplay-info
# well, ./configure isn't interactive here and doesn't take long, so it's
# carried out in order to assist building the package for people with other
# architectures and compiler environments
./configure --prefix=/usr
mkdir debian/tmp
# Compile the shared library
# -O2 and -fPIC may cause problems for certain tunes with gcc's g++.
# Furthermore, -g causes an internal compiler error with gcc's g++.
# This doesn't happen with egcs, so we should use this one.
$(MAKE) -C libsidplay clean
$(MAKE) -C libsidplay CXXFLAGS="-pipe -funroll-loops -O3 -g -Wall -D_REENTRANT -fPIC" \
LDFLAGS="-lc" libsidplay.so
install libsidplay/libsidplay.so debian/tmp/libsidplay.so
# Compile the static library (without '-fPIC')
# Similar problems, to that described above, are not known for static
# libraries (no -fPIC!), but we certainly should use egcs here too.
$(MAKE) -C libsidplay clean
$(MAKE) -C libsidplay CXXFLAGS="-pipe -funroll-loops -O3 -g -Wall -D_REENTRANT" \
LDFLAGS="-lc" libsidplay.a
install libsidplay/libsidplay.a debian/tmp/libsidplay.a
# This is necessary for compiling static and shared libraries in the same directory
$(MAKE) -C libsidplay clean
install debian/tmp/libsidplay.a libsidplay/libsidplay.a
install debian/tmp/libsidplay.so libsidplay/libsidplay.so
rm -rf debian/tmp
# Compile sidplay for console (using egcs, again)
$(MAKE) -C console clean
$(MAKE) -C console CXXFLAGS="-O3 -g -Wall" LDFLAGS="-lc"
touch build-stamp
clean:
dh_testroot
dh_testdir debian/rules libsidplay console sidplay-info
-rm -f build-stamp
# remove data file(s) from ./configure, because they may (and do for other
# architecture than i386) lead to problems when rebuilding the package - so
# far the upstream sources do not supply a 'distclean' target
-rm -f config.cache
# here we can make use of the main Makefile
-$(MAKE) distclean
dh_clean
# Build architecture-independent files here.
binary-indep: build
# Nothing to do here.
# Build architecture-dependent files here.
binary-arch: build
# libsidplay1.36: Shared Library
# libsidplay1.36-dev: Static Library and development files
# sidplay: simple Player application for the console
dh_testversion 0.88
dh_testroot
dh_testdir debian/rules libsidplay console sidplay-info
dh_clean -k
dh_installdirs -A {DEBIAN,usr}
# Installation
$(MAKE) -C libsidplay prefix=`pwd`/debian/tmp/usr install-shared
$(MAKE) -C libsidplay prefix=`pwd`/debian/libsidplay1.36-dev/usr install-headers install-static
mv debian/tmp/usr/lib/*.so debian/libsidplay1.36-dev/usr/lib
install -d -m 755 `pwd`/debian/sidplay/usr/bin
$(MAKE) -C console prefix=`pwd`/debian/sidplay/usr install
# Package organisation
dh_installdocs hv_sids.faq STIL.faq sidplay-info NEWS PROBLEMS
# dh_installexamples
dh_installmenu
# more currently unneeded dh_ scripts from the sample debian/rules file
## dh_installinit
# dh_installcron
# dh_installmanpages
dh_undocumented -psidplay sidplay.1.gz sid2wav.1.gz sidcon.1.gz
dh_installchangelogs libsidplay/DEVELOPER
-rm -rf debian/libsidplay1.36-dev/usr/doc/libsidplay1.36-dev
ln -s libsidplay1.36 debian/libsidplay1.36-dev/usr/doc/libsidplay1.36-dev
-rm -rf debian/sidplay/usr/doc/sidplay
ln -s libsidplay1.36 debian/sidplay/usr/doc/sidplay
dh_strip
dh_compress
dh_fixperms
# dh_suidregister
dh_installdeb
# This trick prevents libsidplay from showing up in shlibs
LD_PRELOAD=libsidplay/libsidplay.so dh_shlibdeps
dh_gencontrol
# dh_makeshlibs -V -plibsidplay1.36
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|