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 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368
|
#!/usr/bin/make -f
# $Id: rules 251 2010-03-23 22:17:56Z robert $
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.
#
# This version is for a multibinary package. It also allows you to build any
# of the binary packages independantly, via binary-<package> targets.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
DEBINSTALLDIR := $(CURDIR)/debian/tmp
SHELL := /bin/bash
DBS_BUILD := $(MAKE) -f /usr/share/dbs/sys-build.mk
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: *\(.*\)-.*/\1/p')
include debian/vars
BUILD_TREE := $(CURDIR)/$(SOURCE_DIR)/$(TAR_DIR)
BUILD_TREE_STATIC := $(CURDIR)/$(SOURCE_DIR)/$(TAR_DIR).STATIC
export FLCOW_PATH := $(CURDIR)/$(SOURCE_DIR)
FLCOW_LIBNAME := /usr/lib/fl-cow/libflcow.so
export LD_PRELOAD := $(FLCOW_LIBNAME):$(LD_PRELOAD)
pafterstep := afterstep
plibafterstep := libafterstep1
plibafterimage := libafterimage0
plibafterimage_dev := libafterimage-dev
export DEB_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: *//p')
# convenient way to set architecture specification strings
# the ifeq condition is here to allow them to be overridden
# from the command line
ifeq (,$(DEB_BUILD_GNU_TYPE))
include /usr/share/dbs/dpkg-arch.mk
endif
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS=-O2 -g
else
CFLAGS=-O0 -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM:=install -s -p -m 755
else
INSTALL_PROGRAM:=install -p -m 755
endif
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
COMMON_CONFIGURE_FLAGS := --build=$(DEB_HOST_GNU_TYPE)
else
COMMON_CONFIGURE_FLAGS := --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
COMMON_CONFIGURE_FLAGS += \
--prefix=/usr \
--datadir=/usr/share \
--mandir=/usr/share/man \
--with-imageloader="display -window root" \
--with-helpcommand="x-terminal-emulator -e man" \
--disable-different-looknfeels \
--enable-savewindows \
--enable-fixeditems \
--with-desktops=4 \
--enable-xinerama \
--with-deskgeometry=2x2 \
--disable-mmx-optimization \
--with-gif \
--with-svg \
--enable-i18n
ifneq (,$(findstring dbg,$(DEB_VERSION)))
COMMON_CONFIGURE_FLAGS+=--enable-gdb
endif
CONF_ADD :=
make-diff:
$(DBS_BUILD) make-diff
unpack: $(STAMP_DIR)/unpack-stamp
$(STAMP_DIR)/unpack-stamp:
$(MAKE) -f debian/packages.d/Makefile
$(MAKE) -f debian/packages.d/Makefile
dh_testdir
@echo
@echo "***** Creating build directory for dynamic libs build *****"
@echo
$(DBS_BUILD) source.make
@echo
@echo "***** Making links to config.{guess,sub} *****"
@echo
find $(BUILD_TREE) -maxdepth 3 -type f -name 'config.guess' \
-exec ln -svf /usr/share/misc/config.guess {} ';'
find $(BUILD_TREE) -maxdepth 3 -type f -name 'config.sub' \
-exec ln -svf /usr/share/misc/config.sub {} ';'
echo test1 > $(BUILD_TREE)/cowtest
@echo
@echo "***** Creating build directory for static libs build *****"
@echo
cp -al $(BUILD_TREE) $(BUILD_TREE_STATIC)
@echo "***** Check if cow is working correctly *****"
# check if cow-fl works correctly
test -f $(FLCOW_LIBNAME)
echo test2 >> $(BUILD_TREE_STATIC)/cowtest \
&& ! cmp -s $(BUILD_TREE)/cowtest $(BUILD_TREE_STATIC)/cowtest
touch "$@"
configure: $(STAMP_DIR)/configure-stamp
$(STAMP_DIR)/configure-stamp: $(STAMP_DIR)/unpack-stamp
@echo
@echo "***** Configure static *****"
@echo
cd $(BUILD_TREE_STATIC) && \
CFLAGS="$(CFLAGS)" LDCONFIG="/bin/true" \
./configure \
$(COMMON_CONFIGURE_FLAGS) \
--enable-staticlibs \
$(CONF_ADD)
@echo
@echo "***** Configure dynamic *****"
@echo
cd $(BUILD_TREE) && \
CFLAGS="$(CFLAGS) -fPIC" LDCONFIG="/bin/true" \
LDFLAGS="-Wl,-z,defs -rdynamic -Wl,--as-needed" \
./configure \
$(COMMON_CONFIGURE_FLAGS) \
--disable-staticlibs \
$(CONF_ADD)
touch "$@"
debian/vars: debian/vars.in debian/changelog
echo "TAR_DIR=AfterStep-$(UPSTREAM_VERSION)" > $@
cat $< >> $@
build: $(STAMP_DIR)/build-stamp
$(STAMP_DIR)/build-stamp: $(STAMP_DIR)/unpack-stamp $(STAMP_DIR)/configure-stamp
@echo
@echo "***** Make static *****"
@echo
cd $(BUILD_TREE_STATIC) && \
$(MAKE) DEBCCFLAGS= DEBLDFLAGS=
@echo
@echo "***** Make dynamic *****"
@echo
cd $(BUILD_TREE) && \
$(MAKE)
touch "$@"
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
$(MAKE) -f debian/packages.d/Makefile clean
-$(DBS_BUILD) source.clean
rm -f debian/vars
### # Add here commands to clean up after the build process.
### -tools/makeasclean
### -$(MAKE) clean
### -$(MAKE) -C debian/DebianLogo clean
### -$(MAKE) distclean
###
### rm -rf $(BLD_STATIC_DIR)
dh_clean
install: DH_OPTIONS=
install: $(STAMP_DIR)/unpack-stamp $(STAMP_DIR)/configure-stamp $(STAMP_DIR)/build-stamp
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# install required dirs in debian/tmp
for i in `dh_listpackages`; do \
dh_installdirs -p$$i -P${DEBINSTALLDIR}; \
done
@echo
@echo "***** Install static *****"
@echo
cd $(BUILD_TREE_STATIC) && \
$(MAKE) install.lib DESTDIR=${DEBINSTALLDIR} \
LDCONFIG=/bin/true \
CP="cp -a" \
INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
INSTALL_DATA="install -p -m 644" \
INSTALL_SCRIPT="install -p -m 755" \
INSTALL_HEADER="install -p -m 644" \
INSTALL_LIB="install -p -m 644" \
INSTALL="install -p" \
AFTER_DOC_DIR=${DEBINSTALLDIR}/usr/share/doc/$(pafterstep)
@echo
@echo "***** Install dynamic *****"
@echo
cd $(BUILD_TREE) && \
$(MAKE) install DESTDIR=${DEBINSTALLDIR} \
LDCONFIG=/bin/true \
CP="cp -a" \
INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
INSTALL_DATA="install -p -m 644" \
INSTALL_SCRIPT="install -p -m 755" \
INSTALL_HEADER="install -p -m 644" \
INSTALL_LIB="install -p -m 644" \
INSTALL="install -p" \
AFTER_DOC_DIR=${DEBINSTALLDIR}/usr/share/doc/$(pafterstep)
@echo
@echo "***** Postinstall cleaning *****"
@echo
cp -a debian/afterstep.lintian ${DEBINSTALLDIR}/usr/share/lintian/overrides/$(pafterstep)
mv -f ${DEBINSTALLDIR}/usr/bin/importasmenu ${DEBINSTALLDIR}/usr/share/doc/$(pafterstep)/examples
# mv -f ${DEBINSTALLDIR}/usr/bin/{ascommand.pl,installastheme.pl,makeastheme.pl} ${DEBINSTALLDIR}/usr/share/doc/$(pafterstep)/examples
install -p -m755 -o root -g root $(BUILD_TREE)/libAfterImage/apps/ascompose ${DEBINSTALLDIR}/usr/bin
install -p -m644 -o root -g root $(BUILD_TREE)/libAfterImage/apps/ascompose.man ${DEBINSTALLDIR}/usr/share/man/man1/ascompose.1x
sh debian/scripts/fix_conffiles
rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/0_Applications
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/3_Screen_savers
rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/1_Desktop/Animations
rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/1_Desktop/{a_xearth,c_snow,b_fish,d_nop}
rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/5_Quit/{4_restarttwm,5_restartwm}
# 20041204: those modules are not in 2.00 yet
rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/scripts
rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/1_Desktop/Theme/0_asthemecreate
rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/1_Desktop/Theme/1_nop
rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Forms
rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Scripts
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/asetroot
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Stop/asetroot_Stop
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Audio
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Stop/Audio_Stop
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Cascade
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Stop/Cascade_Stop
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Clean
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Stop/Clean_Stop
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Gnome
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Stop/Gnome_Stop
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Scroll
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Stop/Scroll_Stop
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Tile
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Stop/Tile_Stop
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Zharf
### rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/2_Modules/Stop/Zharf_Stop
rm -rf ${DEBINSTALLDIR}/usr/share/afterstep/start/5_Quit/1_exit
mv ${DEBINSTALLDIR}/usr/share/doc/$(pafterstep)/html/API ${DEBINSTALLDIR}/usr/share/doc/$(plibafterimage_dev)/html
# mv ${DEBINSTALLDIR}/usr/bin/Save ${DEBINSTALLDIR}/usr/bin/ASSave
# mv ${DEBINSTALLDIR}/usr/share/man/man1/Save.1x \
# ${DEBINSTALLDIR}/usr/share/man/man1/ASSave.1x
find "${DEBINSTALLDIR}" -type d -name "CVS" -exec rm -rf "{}" \;
find "${DEBINSTALLDIR}/usr/share/" \
"${DEBINSTALLDIR}/usr/lib/" \
"${DEBINSTALLDIR}/etc/" \
-type f -exec chmod 644 "{}" \;
mkdir -p -m755 ${DEBINSTALLDIR}/usr/share/afterstep/tools/
mv ${DEBINSTALLDIR}/usr/bin/postcard.sh ${DEBINSTALLDIR}/usr/share/afterstep/tools/postcard.sh
#install -m755 debian/asmenufix ${DEBINSTALLDIR}/usr/share/afterstep/tools/
mkdir -p -m755 ${DEBINSTALLDIR}/usr/share/pixmaps
convert -scale 32x32\! ${DEBINSTALLDIR}/usr/share/afterstep/desktop/icons/logos/AfterStep \
${DEBINSTALLDIR}/usr/share/pixmaps/AfterStep.xpm
$(MAKE) -C debian/DebianLogo PREFIX=${DEBINSTALLDIR} install
dh_install --list-missing --sourcedir=${DEBINSTALLDIR}
dh_installchangelogs -p$(pafterstep) -p$(plibafterstep) -k $(BUILD_TREE)/ChangeLog
dh_installchangelogs -p$(plibafterimage) -p$(plibafterimage_dev) $(BUILD_TREE)/libAfterImage/ChangeLog
dh_makeshlibs -p$(plibafterstep) -V
dh_makeshlibs -p$(plibafterimage) -V
# dh_makeshlibs -p$(plibafterstep) -V "$(plibafterstep) (>= $(version)), $(plibafterstep) (<< $(next_version))"
# dh_makeshlibs -p$(plibafterimage) -V "$(plibafterimage) (>= $(version)), $(plibafterimage) (<< $(next_version))"
# This single target is used to build all the packages, all at once, or
# one at a time. So keep in mind: any options passed to commands here will
# affect _all_ packages. Anything you want to only affect one package
# should be put in another target, such as the install target.
binary-common:
dh_testdir
dh_testroot
dh_installdocs
dh_installexamples
sh debian/scripts/fix_examples
dh_installmenu
rm -f debian/afterstep/etc/menu-methods/afterstep
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installcatalogs
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installman
# dh_installcron
# dh_installinfo
# dh_undocumented
dh_strip
dh_link
dh_compress
dh_fixperms
dh_perl
# dh_python
# dh_makeshlibs -V
dh_installdeb
dh_shlibdeps -L$(plibafterstep) -L$(plibafterimage) -l${DEBINSTALLDIR}/usr/lib
dh_gencontrol
sh debian/scripts/fix_autogen $(shell dh_listpackages)
dh_md5sums
dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: configure build install
# (Uncomment this next line if you have such packages.)
# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
# Build architecture dependant packages using the common target.
binary-arch: configure build install
$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
# Any other binary targets build just one binary package at a time.
binary-%: build install
make -f debian/rules binary-common DH_OPTIONS=-p$*
binary: binary-indep binary-arch
.PHONY: make-diff unpack configure build clean binary-indep binary-arch binary-common binary install
|