source: soft/build_system/build_system/mkcd/tags/V3_3_3_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.0 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 = "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
10PDF_STYLE = "/usr/share/sgml/docbook/xsl-stylesheets-1.47/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        install pm/Mkcd/* $(PREFIX)/$(PERL_VENDORLIB)/Mkcd/
22
23
24doc:    $(DOC).html $(DOC).pdf $(DOC).ps $(DOC).txt
25
26clean:
27        -rm -f *~ pm/Mkcd/*~ doc/*~ mkcd*.tar.bz2
28
29$(DOC).html: $(DOC).xml
30        xsltproc -o $@ $(HTML_STYLE) $<
31
32$(DOC).txt: $(DOC).html
33        lynx -dump $(DOC).html
34
35$(DOC).ps: $(DOC).tex
36        pdf2ps $(DOC).pdf $(DOC).ps
37
38$(DOC).pdf: $(DOC).fo
39        java -classpath $(CLASSOATH) org.apache.fop.apps.Fop $(DOC).fo $(DOC).pdf
40
41$(DOC).fo: $(DOC).xml pdf.xsl
42        xsl-c -in $(DOC).xml -xsl "file://$(PDF_STYLE)" -out $(DOC).fo
43
44# rules to build a test rpm
45
46localrpm: localdist buildrpm
47
48localdist: cleandist dir localcopy tar
49
50cleandist: clean
51        rm -rf $(NAME)-$(VERSION) $(NAME)-$(VERSION).tar.bz2
52
53dir:
54        mkdir $(NAME)-$(VERSION)
55
56localcopy:
57        find . -not -name "$(NAME)-$(VERSION)"|cpio -pd $(NAME)-$(VERSION)/
58        find $(NAME)-$(VERSION) -type d -name CVS -o -name .cvsignore -o -name unused |xargs rm -rf
59
60tar:
61        tar cf $(NAME)-$(VERSION).tar $(NAME)-$(VERSION)
62        bzip2 -9f $(NAME)-$(VERSION).tar
63        rm -rf $(NAME)-$(VERSION)
64
65buildrpm:
66        rpm -ta $(NAME)-$(VERSION).tar.bz2
67
68# rules to build a distributable rpm
69
70rpm: changelog cvstag dist buildrpm
71
72dist: cleandist dir export tar
73
74export:
75        cvs export -d $(NAME)-$(VERSION) -r $(TAG) $(NAME)
76
77cvstag:
78        cvs tag $(CVSTAGOPT) $(TAG)
79
80changelog: ../common/username
81        cvs2cl -U ../common/username -I ChangeLog
82        rm -f ChangeLog.bak
83        cvs commit -m "Generated by cvs2cl the `date '+%d_%b'`" ChangeLog
Note: See TracBrowser for help on using the repository browser.