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
|
#!/usr/bin/make -f
# order of package building
# 0. configure build configuring and patchign the makefile
# 1. jed arch jed
# 2. xjed arch the X11R6 version of jed
# 3. rgrep arch the recursive grep shipped with jed
# 4. jed-common indep compiled slang files and documentation
# 5. jed-sl indep the uncompiled slang filesslang filesslang files
jed=`pwd`/debian/tmp
xjed=`pwd`/debian/xjed
jed-sl=`pwd`/debian/jed-sl
jed-common=`pwd`/debian/jed-common
rgrep=`pwd`/debian/rgrep
build: build-stamp
build-stamp:
dh_testdir
./configure --prefix=/usr --with-x
@echo
@echo "--- enable mouse support for Linux ---"
@echo
@if [ "`uname -s`" == "Linux" ]; then \
cat src/Makefile \
| sed 's/#MOUSEFLAGS/MOUSEFLAGS/' \
| sed 's/#MOUSELIB/MOUSELIB/' \
| sed 's/#GPMMOUSEO/GPMMOUSEO/' \
| sed 's/#OBJGPMMOUSEO/OBJGPMMOUSEO/' \
> src/Makefile.new ; \
mv src/Makefile.new src/Makefile; \
fi
@echo
@echo "--- enable new DFA syntax hilighting ---"
@echo
@cp src/jed-feat.h src/jed-feat.h.old
@cat src/jed-feat.h.old | \
sed "s/`grep DFA src/jed-feat.h`/#define JED_HAS_DFA_SYNTAX 1/" \
> src/jed-feat.h
@rm src/jed-feat.h.old
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
-make distclean
-mv -f src/jed-feat.h.old src/jed-feat.h
-rm -f lib/*.slc
-rm -f src/config.h
dh_clean
binary-indep: build
dh_testversion
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -i
@echo
@echo --- JED-COMMON ---
# install docs
-cp debian/jed-defaults.sl $(jed-common)/etc/jed-defaults.sl
-dh_installdocs -pjed-common README INSTALL
-cp -r doc/* $(jed-common)/usr/doc/jed-common
-rm -f $(jed-common)/usr/doc/jed-common/rgrep*
-cp info/jed* $(jed-common)/usr/info
@echo
@echo --- JED-SL ---
# compile .sl; move compileable .sl to jed-sl.deb
-JED_ROOT=`pwd` ./src/$(ARCH)objs/jed -batch -n -l preparse.sl
-cp -r lib $(jed-common)/usr/lib/jed/
for i in $(jed-common)/usr/lib/jed/lib/*.slc; do \
sl=`basename $$i .slc`.sl; \
if [ -r "$(jed-common)/usr/lib/jed/lib/$$sl" ]; then \
mv $(jed-common)/usr/lib/jed/lib/$$sl \
$(jed-sl)/usr/lib/jed/lib/; \
fi \
done
mv $(jed-sl)/usr/lib/jed/lib/compile.sl $(jed-common)/usr/lib/jed/lib
@echo
@echo --- INSTALL-ARCH-INDEP ---
dh_installdocs -i
dh_installchangelogs -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_shlibdeps -i
#dunno why
touch debian/substvars
touch debian/jed-common.substvars
touch debian/jed-sl.substvars
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary-arch: build
dh_testversion
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -a
@echo
@echo --- MAKE ---
-make JED_ROOT=/usr/lib/jed
-make xjed JED_ROOT=/usr/lib/jed
-make getmail JED_ROOT=/usr/lib/jed
@echo
@echo --- JED ---
-install src/$(ARCH)objs/jed $(jed)/usr/bin
-dh_installmenu -pjed
-dh_installdocs -pjed
-dh_installmanpages -pjed rgrep.1
-cp debian/copyright $(jed)/usr/doc/jed/
@echo
@echo --- XJED ---
-install src/$(ARCH)objs/xjed $(xjed)/usr/X11R6/bin
-dh_installmenu -pxjed
-cp doc/jed.1 $(xjed)/usr/X11R6/man/man1/xjed.1
-gzip -9 $(xjed)/usr/X11R6/man/man1/xjed.1
-cp debian/copyright $(xjed)/usr/doc/xjed/
@echo
@echo --- RGREP ---
-make rgrep
-install src/$(ARCH)objs/rgrep $(rgrep)/usr/bin
-dh_installdocs -prgrep doc/rgrep.txt
-dh_installmanpages -prgrep jed.1
@echo
@echo --- INSTALL-ARCH-DEP ---
dh_installmenu -a
dh_installchangelogs -a
dh_fixperms -a
dh_strip -a
dh_compress -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_makeshlibs -a
dh_md5sums -a
dh_builddeb -a
binary: binary-arch binary-indep
.PHONY: build clean binary binary-arch binary-indep
|