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
|
#!/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
#VER:=$(shell basename `pwd` | sed 's,.*-,,1')
PN:=axiom
VER:=$(shell awk '{if (i) next;i=1;a=$$2;gsub("[()]","",a);split(a,A,"-");print A[1];}' debian/changelog)
PD:=$(PN)-$(VER)
export DH_OPTIONS
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
#NO_SAVE_SYS?=
#ARCHT:=$(shell dpkg --print-architecture)
#ARCHT:=$(DEB_BUILD_ARCH)
#ifeq ($(ARCHT),ia64)
#NO_SAVE_SYS:=t
#endif
#ifeq ($(ARCHT),mips)
#NO_SAVE_SYS:=t
#endif
#ifeq ($(ARCHT),mipsel)
#NO_SAVE_SYS:=t
#endif
#ifeq ($(ARCHT),hppa)
#NO_SAVE_SYS:=t
#endif
#ifeq ($(ARCHT),alpha)
#NO_SAVE_SYS:=t
#endif
# ifeq ($(ARCHT),powerpc)
# NO_STRIP:=--exclude=axiom
# endif
debian/patches_applied:
! [ -e debian/patches_unapplied ] || patch -p0 <debian/patch.all
# ! [ -e debian/patches_unapplied ] || [ "$(NO_SAVE_SYS)" = "" ] || patch -p0 <debian/patch.save
# ! [ -e debian/patches_unapplied ] || [ "$(NO_SAVE_SYS)" != "" ] || patch -p0 <debian/patch.nosave
! [ -e debian/patches_unapplied ] || patch -p0 <debian/patch.merge
rm -f debian/patches_unapplied
touch $@
debian/patches_unapplied:
! [ -e debian/patches_applied ] || patch -R -p0 <debian/patch.all
# ! [ -e debian/patches_applied ] || [ "$(NO_SAVE_SYS)" = "" ] || patch -R -p0 <debian/patch.save
# ! [ -e debian/patches_applied ] || [ "$(NO_SAVE_SYS)" != "" ] || patch -R -p0 <debian/patch.nosave
! [ -e debian/patches_applied ] || patch -R -p0 <debian/patch.merge
rm -f debian/patches_applied
# touch $@
echo foo > $@
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp #debian/patches_applied
dh_testdir
# [ "$(NO_SAVE_SYS)" = "" ] || \
# ( mkdir -p $(CURDIR)/mnt/linux/algebra && cp debian/*aase mnt/linux/algebra/ )
mkdir -p $(CURDIR)/mnt/linux/algebra
cp -pr src/share/algebra/*.daase mnt/linux/algebra
# export AXIOM=$(CURDIR)/mnt/linux ; \
export PATH=$$AXIOM/bin:$$PATH ; \
while sleep 1800 ; do echo tick; done & j=$$!; \
$(MAKE) PASS1=t ; i=$$? ; \
kill $$j || true ; exit $$i
# find -name "*.lsp" -exec touch {} \;
# find -name "*.lisp" -exec touch {} \;
# while sleep 1800 ; do echo tick; done & j=$$!; \
# i=$$? ; kill $$j || true ; exit $$i
export AXIOM=$(CURDIR)/mnt/linux ; \
export PATH=$$AXIOM/bin:$$PATH ; \
export GCL=`which gcl` ; \
eval `dpkg-buildflags --export=sh` && $(MAKE) TESTSET=regresstests GCL=$$(which gcl)
find mnt/linux -name bessintr.eps -exec rm {} \;
find mnt/linux -name htsearch -exec chmod 755 {} \;
find mnt/linux -name command.list -exec chmod -x {} \;
for i in $$(find mnt/linux -name presea); do cat $$i | sed 's,!/bin/awk,!/usr/bin/awk,1' >tmp && mv tmp $$i; done
find mnt/linux -name presea -exec chmod 755 {} \;
echo ")lisp (progn (setq compiler::*default-system-p* nil)(si::save-system \"foo\"))" | AXIOM=$(CURDIR)/mnt/linux $(CURDIR)/mnt/linux/bin/AXIOMsys && mv foo mnt/linux/bin/AXIOMsys
for i in $$(find mnt/linux -wholename "*.daase/*.daase" -type d); do rm -rf $$i; done
touch build-stamp
IFS:=$(addprefix debian/,axiom.install axiom.links axiom-doc.install axiom-doc.links axiom-source.install axiom-source.links axiom-test.install axiom-test.links axiom-databases.install axiom-databases.links axiom-tex.install axiom-graphics.install axiom-graphics-data.install axiom-hypertex.install axiom-hypertex-data.install )
fooclean:
rm -f $(IFS)
clean: #debian/patches_unapplied
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
set
AXIOM=$(CURDIR)/mnt/linux \
C_INCLUDE_PATH=/usr/include:$C_INCLUDE_PATH \
$(MAKE) clean
rm -f lsp/Makefile.dvi src/algebra/Makefile.dvi src/input/Makefile.dvi obj/noweb/contrib/kostas/Makefile obj/noweb/src/c/notangle.o obj/noweb/src/c/getline.o obj/noweb/src/c/match.o obj/noweb/src/c/modules.o obj/noweb/src/c/modtrees.o obj/noweb/src/c/strsave.o obj/noweb/src/c/main.o obj/noweb/src/c/errors.o obj/noweb/src/c/columns.o obj/noweb/src/c/nt obj/noweb/src/c/markmain.o obj/noweb/src/c/markup.o obj/noweb/src/c/markup obj/noweb/src/c/mnt.o obj/noweb/src/c/mnt obj/noweb/src/c/finduses.o obj/noweb/src/c/recognize.o obj/noweb/src/c/finduses mnt/bin/lib/nt mnt/bin/lib/markup mnt/bin/lib/mnt mnt/bin/lib/finduses mnt/bin/Makefile.dvi Makefile.dvi src/Makefile.dvi src/interp/Makefile.dvi src/doc/Makefile.dvi
rm -f lsp/Makefile src/Makefile src/boot/Makefile src/clef/Makefile src/doc/Makefile src/etc/Makefile src/input/Makefile src/interp/Makefile src/lib/Makefile src/scripts/Makefile src/share/Makefile
rm -f src/algebra/Makefile lastBuildDate
find -name Makefile.dvi -exec rm {} \;
rm -f Makefile.linux
rm -f $(IFS)
rm -rf debian/axiom_tutorialu debian/bin debian/axiom.1
find -mindepth 2 -name Makefile -exec rm {} \;
rm -f books/tangle.o
mv books/axiom.sty books/axiom.sty.ori
mv src/axiom-website/CATS/axiom.sty src/axiom-website/CATS/axiom.sty.ori
find -name axiom.sty -exec rm {} \;
mv books/axiom.sty.ori books/axiom.sty
mv src/axiom-website/CATS/axiom.sty.ori src/axiom-website/CATS/axiom.sty
rm -rf kaf*.sdata
rm -f src/interp/bookvol5.pamphlet src/interp/bookvol9.pamphlet src/algebra/bookvol10.2.spad.pamphlet
rm -f src/algebra/bookvol10.4.spad.pamphlet src/algebra/bookvol10.3.spad.pamphlet
rm -f src/interp/Makefile.pamphlet.new debian/test_results
rm -f libdb.text src/algebra/Makefile.help
rm -f src/interp/bookvol10.5.pamphlet src/algebra/*.spad src/lib/Makefile.pdf books/tangle1.lisp
dh_clean
debian/axiom.install:
find mnt/linux -name "*.o" | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/lib/$(PD)/%s\n",$$1,a);}' >>$@
find mnt/linux -name "*.lsp" | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/lib/$(PD)/%s\n",$$1,a);}' >>$@
find mnt/linux/bin/* -newer mnt/linux/bin/Makefile.pamphlet -maxdepth 0 -type f | grep -v /h[yt] | grep -v /view | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/lib/$(PD)/%s\n",$$1,a);}' >>$@
find mnt/linux/lib/* | grep -v copyright | grep -v /h[yt] | grep -v /view | grep -v /graph | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/lib/$(PD)/%s\n",$$1,a);}' >>$@
echo debian/bin/axiom usr/bin >>$@
echo debian/axiom.1 usr/share/man/man1 >>$@
debian/axiom-graphics.install:
find mnt/linux/bin/view* mnt/linux/lib/view* | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/lib/$(PD)/%s\n",$$1,a);}' >>$@
debian/axiom-graphics-data.install:
echo mnt/linux/lib/graph | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/lib/$(PD)/%s\n",$$1,a);}' >>$@
echo mnt/linux/doc/viewports | awk '{printf("%s usr/share/doc/axiom-doc\n",$$1);}' >>$@
debian/axiom-hypertex.install:
find mnt/linux/bin/h[ty]* mnt/linux/lib/h[ty]* | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/lib/$(PD)/%s\n",$$1,a);}' >>$@
debian/axiom-hypertex-data.install:
echo mnt/linux/doc/hypertex | awk '{printf("%s usr/share/doc/axiom-doc\n",$$1);}' >>$@
echo mnt/linux/doc/ps | awk '{printf("%s usr/share/doc/axiom-doc\n",$$1);}' >>$@
echo mnt/linux/doc/bitmaps | awk '{printf("%s usr/share/doc/axiom-doc\n",$$1);}' >>$@
echo mnt/linux/doc/ht.db | awk '{printf("%s usr/share/doc/axiom-doc\n",$$1);}' >>$@
find mnt/linux/doc/*.pamphlet | awk '{printf("%s usr/share/doc/axiom-doc\n",$$1);}' >>$@
debian/axiom.links:
echo usr/share/doc/axiom/copyright usr/lib/$(PD)/lib/copyright >>$@
# echo usr/bin/axiom usr/bin/AXIOMsys >>$@
echo usr/share/man/man1/axiom.1 usr/share/man/man1/AXIOMsys.1 >>$@
debian/axiom-doc.install: debian/axiom-hypertex-data.install debian/axiom-graphics-data.install
find mnt/linux/doc/* -maxdepth 0 | \
$(shell cat $^ | awk '{print "grep -v " $$1 " | "}') \
awk '{printf("%s usr/share/doc/axiom-doc\n",$$1);}' >>$@
echo debian/axiom_tutorialu usr/share/doc/axiom-doc >>$@
debian/axiom-doc.links:
echo usr/share/doc/axiom-doc usr/lib/$(PD)/doc >>$@
debian/axiom-source.install:
echo mnt/linux/src usr/share/$(PD) >>$@
debian/axiom-source.links:
echo usr/share/$(PD)/src usr/lib/$(PD)/src >>$@
debian/axiom-test.install:
echo mnt/linux/input usr/share/$(PD) >>$@
echo debian/test_results usr/share/doc/axiom-test >>$@
echo debian/bin/axiom-test usr/bin >>$@
echo debian/axiom-test.1 usr/share/man/man1 >>$@
debian/axiom-test.links:
echo usr/share/$(PD)/input usr/lib/$(PD)/input >>$@
debian/axiom-databases.install:
find mnt/linux -name "*.daase" | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/share/$(PD)/%s\n",$$1,a);}' >>$@
find mnt/linux -name "*.text" | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/share/$(PD)/%s\n",$$1,a);}' >>$@
find mnt/linux -name "*.data" | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/share/$(PD)/%s\n",$$1,a);}' >>$@
debian/axiom-databases.links:
find mnt/linux -name "*.daase" | awk '{a=$$1;sub("mnt/linux/","",a);printf("usr/share/$(PD)/%s usr/lib/$(PD)/%s\n",a,a);}' >>$@
find mnt/linux -name "*.text" | awk '{a=$$1;sub("mnt/linux/","",a);printf("usr/share/$(PD)/%s usr/lib/$(PD)/%s\n",a,a);}' >>$@
find mnt/linux -name "*.data" | awk '{a=$$1;sub("mnt/linux/","",a);printf("usr/share/$(PD)/%s usr/lib/$(PD)/%s\n",a,a);}' >>$@
debian/axiom-tex.install:
echo books/axiom.sty | awk '{a=$$1;sub("/[^/]*$$","",a);sub("mnt/linux/","",a);printf("%s usr/share/texmf/tex/plain/misc\n",$$1);}' >>$@
debian/axiom_tutorialu: debian/axiom_tutorial
cp -a $< $@
rm -f $@/images/*.uu
GIFS:=$(shell ls -1 debian/axiom_tutorial/images/*.gif.uu | sed -e "s,\.uu$$,,1" -e "s,axiom_tutorial,axiom_tutorialu,1")
$(GIFS): debian/axiom_tutorialu/images/%.gif: debian/axiom_tutorial/images/%.gif.uu debian/axiom_tutorialu
cd $(@D) && uudecode ../../../$<
debian/bin/axiom: mnt/linux/bin/axiom debian/run-sman.sh
mkdir -p $(@D)
cat $< | sed -e "s,^SPADDEFAULT=\(.*\),SPADDEFAULT=\1;export AXIOM=/usr/lib/axiom-$(VER);export PATH=\$$AXIOM/bin:\$$PATH,1" \
-e "s,^otheropts=.*,otheropts=\"\$$([ -x /usr/lib/axiom-$(VER)/bin/hypertex ] || echo -noht) \$$([ -x /usr/lib/axiom-$(VER)/lib/viewman ] || echo -nogr)\",1" \
-e "s,^exec[ \t]\(.*\),#exec \1,1" >$@
cat debian/run-sman.sh >>$@
chmod +x $@
debian/axiom.1: debian/axiom.1.in
mkdir -p $(@D)
cat $< | sed "s,@VER@,$(VER),g" >$@
chmod +x $@
debian/bin/axiom-test: debian/axiom-test.sh
mkdir -p $(@D)
cat $< | sed "s,@PD@,$(PD),g" >$@
chmod +x $@
#mnt/linux/doc/book.pdf: mnt/linux/doc/book.dvi
# cd $(@D) && dvipdfm $(subst .pdf,,$(@F))
debian/test_results: build
rm -f $@
find -name "*.output" -exec cat {} \; >>$@
install: DH_OPTIONS=
install: build $(GIFS) debian/axiom.1 debian/bin/axiom debian/bin/axiom-test \
debian/test_results $(IFS) # mnt/linux/doc/book.pdf
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
for i in sty data text daase; do find mnt/linux -type f -name "*.$$i" -exec chmod -x {} \; ; done
find mnt/linux/doc -type f -exec chmod -x {} \;
find mnt/linux -name "summary" -exec chmod -x {} \;
for i in $$(find mnt/linux -name CVS -type d); do rm -rf $$i ; done
# Build architecture-independent files here.
binary-indep: DH_OPTIONS:=-i
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs changelog
dh_installdocs
dh_installexamples
dh_install
dh_installmenu
dh_installtex -p axiom-tex
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip $(NO_STRIP)
dh_compress -X.xhtml $(shell cat debian/axiom-hypertex-data.install debian/axiom-graphics-data.install | grep axiom-doc | sed 's,mnt/linux/doc/\([^ ]*\).*,-Xaxiom-doc/\1,g')
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture-dependent files here.
binary-arch: DH_OPTIONS:=-a
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs changelog
dh_installdocs
dh_installexamples
dh_install
dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip $(NO_STRIP)
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install configure
|