]> git.pld-linux.org Git - SPECS.git/blob - tex4ht.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / tex4ht.spec
1 Summary:        TeX to XML translator
2 Summary(pl.UTF-8):      Konwerter z TeXa do XML-a
3 Name:           tex4ht
4 Version:        20050228
5 Release:        0.1
6 License:        LaTeX Project Public License
7 Group:          Applications/Publishing/TeX
8 Source0:        http://www.ctan.org/tex-archive/support/TeX4ht/%{name}-all.zip
9 # Source0-md5:  26eb8df2d6631794b3df0d6fb87a0219
10 Patch0:         %{name}-env-giftrans.patch
11 BuildRequires:  unzip
12 Requires:       ghostscript >= 4.03
13 Requires:       giftrans
14 Requires:       netpbm-progs
15 Requires:       tetex-dvips >= 0.4
16 Requires:       tetex-latex >= 0.4
17 # latex2html is required for pstoimg script, that is provided by it
18 # see Patch0
19 #Requires:      latex2html
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 Program to convert (La)TeX documents to XML, using (La)TeX to process
24 images and equations.
25
26 %description -l pl.UTF-8
27 Program do konwertowania dokumentów (La)TeXa do formatu XML przy
28 użyciu (La)TeXa do przetwarzania obrazów i równań.
29
30 %prep
31 %setup -q -c
32 unzip -q %{name}.zip
33 #%patch0 -p0
34
35 %build
36 cd src
37 %{__cc} %{rpmldflags} %{rpmcflags} -o tex4ht tex4ht.c -DHAVE_DIRENT_H
38 %{__cc} %{rpmldflags} %{rpmcflags} -o t4ht t4ht.c -DHAVE_DIRENT_H
39 %{__cc} %{rpmldflags} %{rpmcflags} -o htcmd htcmd.c -DHAVE_DIRENT_H
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_datadir},%{_bindir}}
44
45 install src/{tex4ht,t4ht,htcmd} $RPM_BUILD_ROOT%{_bindir}
46 for f in bin/unix/* ; do
47         cat $f | sed -e 's!~/tex4ht\.dir!%{_datadir}!' |\
48         sed -e 's! -i! -e%{_datadir}/texmf/tex4ht/base/tex4ht.env -i!' |\
49         sed -e 's!## -d.*$!-e%{_datadir}/texmf/tex4ht/base/tex4ht.env!' >$f.tmp
50
51         mv $f.tmp $f
52 done
53 for f in bin/unix/oo* ; do
54         sed -e 's!t4ht -f/$1 $4 -coo!t4ht -f/$1 $4 -coo -e%{_datadir}/texmf/tex4ht/base/tex4ht.env!' -i $f;
55 done
56
57 install bin/unix/* $RPM_BUILD_ROOT%{_bindir}
58
59 mkdir docs
60 mv *.html *.css *.png docs
61
62 cp -r texmf $RPM_BUILD_ROOT%{_datadir}
63 cd $RPM_BUILD_ROOT%{_datadir}/texmf/tex4ht/base
64
65 cat unix/tex4ht.env | sed -e 's!~/tex4ht\.dir!%{_datadir}!' | \
66         sed -e 's!path/tex!%{_datadir}!' >./tex4ht.env
67 rm -r win32
68 rm -r unix
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %post   -p %{_bindir}/mktexlsr
74 %postun -p %{_bindir}/mktexlsr
75
76 %files
77 %defattr(644,root,root,755)
78 %doc docs/*
79 %attr(755,root,root) %{_bindir}/*
80 %dir %{_datadir}/texmf/tex/generic/tex4ht
81 %{_datadir}/texmf/tex/generic/tex4ht/*.4ht
82 %{_datadir}/texmf/tex/generic/tex4ht/tex4ht.sty
83 %{_datadir}/texmf/tex4ht
This page took 0.324821 seconds and 3 git commands to generate.