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
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Made with the aid of debhelper by Joey Hess,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
#
# This is free software; see the GNU General Public Licence
# version 2 or later for copying conditions. There is NO warranty.
#
# Currently maintained by Danai SAE-HAN (韓達耐) <danai@debian.org>
# for Debian GNU/Linux.
SHELL = /bin/sh
include /usr/share/dpkg/buildflags.mk
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# When you use the official CVS, SVN, GIT source tree. =CVS:.svn:.git
export DH_ALWAYS_EXCLUDE=.git:CVS:.svn
# The build directory for Thai fonts.
build_thaifonts = build_thaifonts
# Stuff for get-orig-source.
# Getting the revision numbers according to debian/changelog, the HARD way.
#upstream_version := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')
#isodate := $(shell dpkg-parsechangelog | sed -ne 's/^Version.*git\(.*\)-.*/\1/p')
#unixdate := $(shell date -d $(isodate) +%s)
# Add 24 hours to the Unix timestamp.
#unixdate := $(shell expr $(unixdate) + 86400 )
# To get the Master revision number (i.e. 4.8.0), use:
# dpkg-parsechangelog | sed -ne 's/^Version: *\([^+-]*\).*/\1/p'
build: $(QUILT_STAMPFN) build-stamp
build-arch: build-arch-stamp
build-arch-stamp:
dh_testdir
# Update config.{guess,sub}
dh_update_autotools_config
# Add here commands to compile the package.
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
dh_auto_configure --sourcedirectory=utils/hbf2gf -- \
--with-kpathsea-lib=/usr/lib \
--with-kpathsea-include=/usr/include
dh_auto_build --sourcedirectory=utils/hbf2gf
dh_auto_build
touch build-arch-stamp
build-indep: build-indep-stamp
build-indep-stamp:
dh_testdir
mkdir $(build_thaifonts)
# The upstream patch on 2008-12-28 in CJK provided support for
# the ThaiLaTeX fonts that shipped with v0.4.2.
# Before this patch CJK couldn't directly use the same fonts as
# ThaiLaTeX. latex-cjk-thai therefore installed its own extra fonts.
# If you still wish to use these modified fonts, then don't forget to
# uncomment the last two lines in debian/latex-cjk-thai.install ,
# to comment/uncomment some of the lines below and to remove the
# dependency on thailatex.
# # Extracting binary files
# How it was used: uuencode thaifonts.tar.gz thaifonts.tar.gz > thaifonts.tar.gz.uu
# You will need a Build-Dependency on the `sharutils' package in debian/control.
# cd debian && uudecode thaifonts.tar.gz.uu && tar xzf thaifonts.tar.gz
# (cd $(build_thaifonts) && cp ../utils/thaifont/tools/c90.* ../utils/thaifont/tools/*.fontinst ../debian/thaifonts/* . && cd ../debian/thaifonts && prename 's/_//' * && prename 's/\./n\./' norasi.* garuda.*)
(cd $(build_thaifonts) && cp ../utils/thaifont/tools/c90.* ../utils/thaifont/tools/*.fontinst /usr/share/texlive/texmf-dist/fonts/afm/public/fonts-tlwg/garuda*.afm /usr/share/texlive/texmf-dist/fonts/afm/public/fonts-tlwg/norasi*.afm .)
(cd $(build_thaifonts) && tex norasi-c90.fontinst && tex garuda-c90.fontinst && for i in f*.pl; do pltotf $$i; done)
touch build-indep-stamp
build-stamp:
touch build-stamp
clean:
# dh_testdir doc/CJKutf8.txt examples/CJKbabel.tex
dh_testroot
rm -f build-stamp build-indep-stamp build-arch-stamp
# Add here commands to clean up after the build process.
# If a Debian patch has been applied on Makefile, perform a distclean;
# if not, do nothing. Reason: CJK upstream has no cleaning targets.
if [ $(shell grep -c distclean Makefile) -gt 0 ]; then $(MAKE) distclean; fi
# Remove the binary files.
rm -rf $(build_thaifonts)
# Remove the .c file created by ctangle.
# This dirty hack is due to the introduction of the Lintian warning
# "patch-system-but-direct-changes-in-diff". For more information,
# check out Debian bug #471263 at
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471263 .
# It would otherwise also create problems for Debian Source 3.0 (quilt).
# Clean up config.{guess,sub}
# dh_autotools-dev_restoreconfig
dh_clean
install:
dh_testdir
dh_testroot
# dh_installdirs -platex-cjk-chinese usr/share/texmf/tex/latex/CJK/CEF
# Add here commands to install the package into debian/tmp.
$(MAKE) prefix=$(CURDIR)/debian/tmp/usr install
# Build architecture-independent files here.
binary-indep: build-indep
dh_testdir -i
dh_testroot -i
# Install files in the respective subpackages, according
# to the [package].install files.
dh_install -i
dh_link -platex-cjk-korean usr/share/doc/latex-cjk-common usr/share/doc/latex-cjk-korean
dh_link -platex-cjk-all usr/share/doc/latex-cjk-common usr/share/doc/latex-cjk-all
dh_link -pcjk-latex usr/share/doc/latex-cjk-common usr/share/doc/cjk-latex
dh_link -platex-cjk-thai usr/share/doc/latex-cjk-common usr/share/doc/latex-cjk-thai
dh_installtex -platex-cjk-thai --flavor=map:config_for_all_maps map=Map,garuda-c90.map map=Map,norasi-c90.map
dh_installtex -platex-cjk-korean
dh_installemacsen -i
dh_lintian -i
dh_compress -i
dh_fixperms -i
dh_shlibdeps -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build build-arch install
dh_testdir -a
dh_testroot -a
# Install files in the respective subpackages, according
# to the [package].install files.
dh_install -a
chmod +x debian/latex-cjk-common/usr/share/latex-cjk-common/utils/subfonts/*.pl
dh_link -platex-cjk-chinese usr/share/doc/latex-cjk-common usr/share/doc/latex-cjk-chinese
dh_link -platex-cjk-japanese usr/share/doc/latex-cjk-common usr/share/doc/latex-cjk-japanese
# Get the documentation in texdoc. texdoctk unfortunately uses another engine.
dh_link -platex-cjk-common usr/share/doc/latex-cjk-common usr/share/texmf/doc/latex/latex-cjk
dh_installtex -platex-cjk-common -platex-cjk-japanese
dh_installtex -platex-cjk-chinese
dh_installdocs -platex-cjk-common
dh_installexamples -platex-cjk-common
dh_installman -a
dh_installchangelogs -platex-cjk-common ChangeLog
dh_installemacsen -a
dh_strip --exclude=.pl -a
dh_lintian -a
dh_compress -a
dh_fixperms -a
dh_shlibdeps -a
dh_installdeb -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
#get-orig-source:
# Cleaning
#rm -rf cjk-$(upstream_version)
#rm -f ../cjk_$(upstream_version).orig.tar.gz
# Download the latest GIT version and downgrade it to $(unixdate).
#git clone git://git.sv.gnu.org/cjk.git cjk-$(upstream_version)
# cd cjk-$(upstream_version) && git reset --hard `git rev-list --all -n 1 --before=$(unixdate)`
# Make a pristine package.
#mkdir -p ../tarballs
# --no-name/-n is important because it won't save the timestamp in the
# 5th to 8th byte of the gzip.
#cd cjk-$(upstream_version) && git archive --format=tar --prefix=cjk-$(upstream_version)/ $$(git rev-list --all -n 1 --before=$(unixdate)) | gzip -9 --no-name -c > ../../tarballs/cjk_$(upstream_version).orig.tar.gz
# Clean again, because we use svn-buildpackage afterwards.
#rm -rf cjk-$(upstream_version)
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install get-orig-source
|