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
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
pkg-ctn := ctn
pkg-ctn-dev := ctn-dev
%:
dh $@
# we must provide *SIZE inside dicom.h or otherwise applications which
# would use ctn might be doomed to get improper U32 types etc
# that file will be included in dicom.h - hard patched
debian/savefiles:
mkdir -p debian/savefiles
mkdir -p debian/savefiles/apps/dcm_modify_object
cp -a apps/dcm_modify_object/gram.h debian/savefiles/apps/dcm_modify_object
debian/test-sizes: debian/savefiles
cc debian/test-sizes.c -o debian/test-sizes
debian/intsizes.h: debian/test-sizes
sh debian/intsizes_h.sh
override_dh_auto_build: debian/intsizes.h
debian/test-sizes >| debian/ctnmake.debian.mysql.options.full
echo "CFLAGS=$(CFLAGS)" >> debian/ctnmake.debian.mysql.options.full
echo "LDFLAGS=$(LDFLAGS)" >> debian/ctnmake.debian.mysql.options.full
cat debian/ctnmake.debian.mysql.options >> debian/ctnmake.debian.mysql.options.full
mv debian/intsizes.h facilities/dicom/
chmod +x $(CURDIR)/apps/scripts/createdirectory
chmod +x $(CURDIR)/apps/scripts/checkEnvironment
mkdir $(CURDIR)/lib
mkdir $(CURDIR)/include
(. debian/debian.mysql.options.env; make install)
override_dh_auto_clean:
dh_auto_clean
# restore changed files
if [ -d debian/savefiles ] ; then \
mv debian/savefiles/apps/dcm_modify_object/gram.h apps/dcm_modify_object ; \
rm -rf debian/savefiles/apps ; \
fi
rm -rf debian/savefiles
rm -f debian/ctn*.postinst.* debian/ctn*.prerm.* debian/intsizes.h
rm -f debian/ctnmake.debian.mysql.options.full debian/test-sizes
rm -f facilities/dicom/intsizes.h
rm -f libsrc/*.c libsrc/*.h
rm -f `find . -name \*.o -or -name \*.a`
rm -rf include
rm -rf lib
override_dh_prep:
# ctn build process does build+install in one rush
# dear dh_prep, please leave my debian/tmp
mv $(CURDIR)/debian/tmp $(CURDIR)/debian/do_not_delete_this_tmp_dir
dh_prep
mv $(CURDIR)/debian/do_not_delete_this_tmp_dir $(CURDIR)/debian/tmp
override_dh_auto_install:
echo 'Do not try to call `make install` since it requires setting variable DICOM_MAKE'
override_dh_fixperms:
dh_fixperms
chmod +x `echo $(CURDIR)/debian/$(pkg-ctn)/usr/share/ctn/mysql/*`
chmod -x `echo $(CURDIR)/debian/$(pkg-ctn)/usr/share/ctn/mysql/*.script`
# Remark: The following uscan command requires devscripts > 2.12.4 which is not
# yet released at the time of this package release. The code can be obtained
# via
# git clone git://tille@git.debian.org/git/users/tille/devscripts.git
# and then use scripts/uscan.pl
get-orig-source:
mkdir -p ../tarballs
uscan --verbose --force-download --destdir=../tarballs --repack-compression xz
|