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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
|
#!/usr/bin/make -f
#
# Created 20 December 1997 by Enrique Zanardi <ezanardi@ull.es>
# Modified 2002-2004 by Alastair McKinstry, <mckinstry@debian.org>
#
# Copying and modification is unlimited, provided that the modified
# version is marked as being modified.
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq ($(DEB_HOST_GNU_TYPE), $(DEB_BUILD_GNU_TYPE))
CROSS=--build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
CROSSCC=$(DEB_HOST_GNU_TYPE)-gcc
else
CROSS=
CROSSCC=gcc
endif
VERSION=0.52.11
SONAME=0.52
PYVERS=$(shell pyversions -vr debian/control)
LIB_PKG=libnewt$(SONAME)
DEV_PKG=libnewt-dev
PIC_PKG=libnewt-pic
TCL_PKG=newt-tcl
PYTHON_PKG=python-newt
PYTHON_DBG_PKG=python-newt-dbg
WHIPTAIL_PKG=whiptail
# the dbs rules
TAR_DIR=newt-$(VERSION)
include /usr/share/dbs/dbs-build.mk
ifeq (,$(DEB_HOST_ARCH_OS))
include /usr/share/dbs/dpkg-arch.mk
endif
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
# get the items created here.
binarytarget=binary-devel binary-shared binary-runtime binary-tcl \
binary-python binary-python-dbg binary-pic
#target specific configurations come here:
LIBCDEV=libc-dev
GPMSUPPORT= --with-gpm-support
ifneq ($(DEB_HOST_ARCH_OS),linux)
LIBCDEV=libc6-dev
ifeq ($(DEB_HOST_ARCH_CPU),alpha)
LIBCDEV=libc6.1-dev
endif
ifeq ($(DEB_HOST_ARCH_CPU),ia64)
LIBCDEV=libc6.1-dev
endif
endif
ifeq ($(DEB_HOST_ARCH_OS),hurd)
GPMSUPPORT=
LIBCDEV=libc0.3-dev
endif
ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
LIBCDEV=libc0.1-dev
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
NOSTRIP=--with-nostrip=no
else
NOSTRIP=--with-nostrip=yes
endif
build-stamp=$(STAMP_DIR)/build-stamp
configure-stamp=$(STAMP_DIR)/configure-stamp
$(configure-stamp): $(patched)
dh_testdir
cp newt.spec $(BUILD_TREE)
rm -f $(BUILD_TREE)/.depend
( cd $(BUILD_TREE) && autoconf --force -i )
( cd $(BUILD_TREE) && ./configure --prefix=/usr $(GPMSUPPORT) $(NOSTRIP) $(CROSS) )
touch $@
build: $(build-stamp)
$(build-stamp): $(configure-stamp)
dh_testdir
( cd $(BUILD_TREE) && sgmltools --backend html tutorial.sgml )
CC=$(CROSSCC) $(MAKE) -C $(BUILD_TREE)
( cd $(BUILD_TREE) && ar cqv libnewt_pic.a shared/*.o )
# build POT file for translators
make -C $(BUILD_TREE)/po newt.pot
touch $@
clean:
dh_testdir
dh_testroot
dh_clean
rm -rf $(SOURCE_DIR) $(STAMP_DIR)
rm -f debian/python-newt*.dirs debian/python-newt*.install debian/python-newt.postinst
# rm -rf debian/substvars debian/*.bak debian/*~ *~
binary: binary-indep binary-arch
binary-indep:
binary-arch: $(LIB_PKG) $(DEV_PKG) $(PIC_PKG) $(TCL_PKG) $(PYTHON_PKG) $(PYTHON_DBG_PKG) $(WHIPTAIL_PKG)
$(LIB_PKG): build
dh_testdir
dh_testroot
dh_installdirs -p $@
dh_install -p $@ --sourcedir=$(BUILD_TREE)
# chmod +x $(BUILD_TREE)/mkinstalldirs
CC=$(CROSSCC) $(MAKE) -C $(BUILD_TREE)/po datadir=../../../debian/$(LIB_PKG)/usr/share HAVE_XGETTEXT=yes install
dh_strip -p $@
dh_makeshlibs -p $@
dh_shlibdeps -L $(LIB_PKG) -l debian/$@/usr/lib
dh_installdocs -p $@
dh_link -p $@ /usr/lib/libnewt.so.$(VERSION) /usr/lib/libnewt.so.$(SONAME)
rm debian/$@/usr/lib/libnewt.so
# Currently disabled, as debian-test has been removed.
# chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh
dh_installchangelogs -p $@
dh_compress -p $@
dh_installdeb -p $@
dh_fixperms -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(PIC_PKG): build
dh_testdir
dh_testroot
dh_installdirs -p $@
dh_install -p $@ --sourcedir=$(BUILD_TREE)
cp $(BUILD_TREE)/newt*.ver debian/libnewt-pic/usr/lib/libnewt_pic.map
dh_strip -p $@
dh_makeshlibs -p $@
dh_installdocs -p $@ -p $@ $(BUILD_TREE)/newt.spec
# Currently disabled, as debian-test has been removed.
# chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh
dh_installchangelogs -p $@
dh_compress -p $@
dh_shlibdeps -p $@ -ldebian/$@/usr/lib
dh_fixperms -p $@
dh_installdeb -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(DEV_PKG): build
dh_testdir
dh_testroot
dh_installdirs -p $@
dh_install -p $@ --sourcedir=$(BUILD_TREE)
dh_strip -p $@
dh_makeshlibs -p $@
dh_installdocs -p $@ -p $@ $(BUILD_TREE)/newt.spec
dh_link -p $@ /usr/lib/libnewt.so.$(VERSION) /usr/lib/libnewt.so
dh_link -p $@ \
/usr/share/doc/libnewt-dev/tutorial.html/t1.html \
/usr/share/doc/libnewt-dev/tutorial.html/index.html
# Currently disabled, as debian-test has been removed.
# chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh
dh_installchangelogs -p $@
dh_installexamples -p $@
dh_compress -p $@
dh_shlibdeps -p $@ -ldebian/$@/usr/lib
dh_fixperms -p $@
dh_installdeb -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(TCL_PKG): build
dh_testdir
dh_testroot
dh_installdirs -p $@
dh_install -p $@ --sourcedir=$(BUILD_TREE)
dh_strip -p $@
dh_makeshlibs -p $@
dh_installdocs -p $@ -p $@ $(BUILD_TREE)/newt.spec
# Currently disabled, as debian-test has been removed.
# chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh
dh_installchangelogs -p $@
dh_compress -p $@
dh_shlibdeps -p $@ -ldebian/$@/usr/lib
dh_fixperms -p $@
dh_installdeb -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(PYTHON_PKG): build
dh_testdir
dh_testroot
for v in $(PYVERS); do \
pylib=$$(python$$v -c 'from distutils import sysconfig; print sysconfig.get_python_lib()'); \
echo $$pylib >> debian/$@.dirs; \
echo python$$v/_snackmodule.so $$pylib/ \
>> debian/$@.install; \
echo snack.py $$pylib \
>> debian/$@.install; \
done
dh_installdirs -p $@
dh_install -p $@ --sourcedir=$(BUILD_TREE)
dh_strip -p $@ --dbg-package python-newt-dbg
DH_PYCENTRAL=include-links dh_pycentral -p $@
dh_installdocs -p $@ $(BUILD_TREE)/newt.spec
# Currently disabled, as debian-test has been removed.
# chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh
dh_installchangelogs -p $@
dh_installexamples -p $@
dh_compress -p $@
dh_shlibdeps -p $@ -ldebian/$@/usr/lib
dh_fixperms -p $@
dh_installdeb -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(PYTHON_DBG_PKG): build $(PYTHON_PKG)
dh_testdir
dh_testroot
for v in $(PYVERS); do \
pylib=$$(python$$v -c 'from distutils import sysconfig; print sysconfig.get_python_lib()'); \
echo $$pylib >> debian/$@.dirs; \
echo python$$v/_snackmodule_d.so $$pylib/ \
>> debian/$@.install; \
done
dh_installdirs -p $@
dh_install -p $@ --sourcedir=$(BUILD_TREE)
DH_PYCENTRAL=include-links dh_pycentral -p $@
mkdir -p debian/python-newt-dbg/usr/share/doc
ln -sf python-newt debian/python-newt-dbg/usr/share/doc/python-newt-dbg
dh_compress -p $@
dh_shlibdeps -p $@ -ldebian/$@/usr/lib
dh_fixperms -p $@
dh_installdeb -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(WHIPTAIL_PKG): build
dh_testdir
dh_testroot
dh_installdirs -p $@
dh_install -p $@ --sourcedir=$(BUILD_TREE)
dh_strip -p $@
dh_makeshlibs -V
dh_installdocs -p $@ -p $@ $(BUILD_TREE)/newt.spec debian/README.whiptail
dh_installman -p $@ $(BUILD_TREE)/whiptail.1
# Currently disabled, as debian-test has been removed.
# chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh
dh_installchangelogs -p $@
dh_compress -p $@
dh_shlibdeps -p $@ -L $(LIB_PKG) -l debian/$(LIB_PKG)/usr/lib
dh_fixperms -p $@
dh_installdeb -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
.PHONY: binary-arch clean source diff binary binary-indep
|