source: soft/build_system/build_system/mkcd/tags/V3_8_6_1mdk/Makefile @ 1

Last change on this file since 1 was 1, checked in by fasma, 12 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 2.1 KB
Line 
1NAME = mkcd
2VERSION:=$(shell rpm -q --qf %{VERSION} --specfile $(NAME).spec)
3RELEASE:=$(shell rpm -q --qf %{RELEASE} --specfile $(NAME).spec)
4TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__')
5
6DOC = mkcd
7
8ALL = 
9HTML_STYLE = "/usr/share/sgml/docbook/xsl-stylesheets-1.61.3/html/docbook.xsl"
10PDF_STYLE = "/usr/share/sgml/docbook/xsl-stylesheets-1.61.3/fo/docbook.xsl"
11TXT_STYLE =
12TEX_STYLE =
13
14PERL_VENDORLIB=$(shell eval "`perl -V:installvendorlib`"; echo $$installvendorlib)
15
16install: $(ALL)
17        install -d $(PREFIX)/usr/bin
18        install mkcd $(PREFIX)/usr/bin
19        install clean-rpmsrate $(PREFIX)/usr/bin
20        install -d $(PREFIX)/$(PERL_VENDORLIB)/Mkcd
21        for i in Commandline.pm Disc.pm Functions.pm Group.pm List.pm Optimize.pm Package.pm Tools.pm; do install pm/Mkcd/$$i $(PREFIX)/$(PERL_VENDORLIB)/Mkcd/; done
22
23doc:    $(DOC).html $(DOC).pdf $(DOC).ps $(DOC).txt
24
25clean:
26        -rm -f *~ pm/Mkcd/*~ doc/*~ mkcd*.tar.bz2
27
28$(DOC).html: $(DOC).xml
29        xsltproc -o $@ $(HTML_STYLE) $<
30
31$(DOC).txt: $(DOC).html
32        lynx -dump $(DOC).html
33
34$(DOC).ps: $(DOC).tex
35        pdf2ps $(DOC).pdf $(DOC).ps
36
37$(DOC).pdf: $(DOC).fo
38        java -classpath $(CLASSOATH) org.apache.fop.apps.Fop $(DOC).fo $(DOC).pdf
39
40$(DOC).fo: $(DOC).xml pdf.xsl
41        xsl-c -in $(DOC).xml -xsl "file://$(PDF_STYLE)" -out $(DOC).fo
42
43# rules to build a test rpm
44
45localrpm: localdist buildrpm
46
47localdist: cleandist dir localcopy tar
48
49cleandist: clean
50        rm -rf $(NAME)-$(VERSION) $(NAME)-$(VERSION).tar.bz2
51
52dir:
53        mkdir $(NAME)-$(VERSION)
54
55localcopy:
56        find . -not -name "$(NAME)-$(VERSION)"|cpio -pd $(NAME)-$(VERSION)/
57        find $(NAME)-$(VERSION) -type d -name CVS -o -name .cvsignore -o -name unused |xargs rm -rf
58
59tar:
60        tar cf $(NAME)-$(VERSION).tar $(NAME)-$(VERSION)
61        bzip2 -9f $(NAME)-$(VERSION).tar
62        rm -rf $(NAME)-$(VERSION)
63
64buildrpm:
65        rpm -ta $(NAME)-$(VERSION).tar.bz2
66
67# rules to build a distributable rpm
68
69rpm: changelog cvstag dist buildrpm
70
71dist: cleandist dir export tar
72
73export:
74        cvs export -d $(NAME)-$(VERSION) -r $(TAG) $(NAME)
75
76cvstag:
77        cvs tag $(CVSTAGOPT) $(TAG)
78
79changelog: ../common/username
80        cvs2cl -U ../common/username -I ChangeLog --accum -W 400
81        rm -f ChangeLog.bak
82        cvs commit -m "Generated by cvs2cl the `date '+%d_%b'`" ChangeLog
Note: See TracBrowser for help on using the repository browser.