Magellan Linux

Contents of /trunk/core/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.76.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10181 - (show annotations) (download)
Thu Jan 19 12:30:49 2012 UTC (12 years, 4 months ago) by niro
File size: 1679 byte(s)
-import from magellan-next
1 # $Id$
2
3 PNAME="docbook-xsl-stylesheets"
4 PVER="1.76.1"
5 PBUILD="r1"
6
7 PCAT="app-text"
8
9 DESCRIPTION="DocBook XML stylesheets."
10 HOMEPAGE="http://docbook.sourceforge.net/"
11
12 DEPEND=">= dev-libs/libxml2-2.7
13 >= app-text/build-docbook-catalog-1.4"
14
15 SRCFILE="docbook-xsl-${PVER}.tar.bz2"
16 SRCDIR="${BUILDDIR}/docbook-xsl-${PVER}"
17
18 sminclude mtools
19
20 SRC_URI=(
21 sourceforge://docbook/${SRCFILE}
22 mirror://${PNAME}/${SRCFILE}
23 )
24
25 UP2DATE="updatecmd_sourceforge docbook docbook-xsl"
26
27 src_prepare()
28 {
29 munpack ${SRCFILE} || die
30 }
31
32 src_install()
33 {
34 cd ${SRCDIR}
35
36 local DEST="/usr/share/sgml/docbook/xsl-stylesheets"
37 local DOCDIR="/usr/share/doc/${PNAME}-${PVER}"
38
39 # needed directories
40 minstalldir /${DEST} || die
41 minstalldir /${DOCDIR} || die
42
43 local sheets="$(find ${SRCDIR} -maxdepth 1 -mindepth 1 -type d -printf '%f \n')"
44
45 for i in ${sheets}
46 do
47 cd ${SRCDIR}
48 cp -af ${i} ${BINDIR}/${DEST} || die
49 cd ${BINDIR}/${DEST}/${i} || die
50
51 [ -e ChangeLog ] && { mv ChangeLog ${BINDIR}/${DOCDIR}/ChangeLog.${i} || die; }
52 [ -e README ] && { mv README ${BINDIR}/${DOCDIR}/README.${i} || die; }
53 done
54
55 # install the documentation
56 cd ${SRCDIR}
57 # that's now an extra tarball, we don't need it anyway
58 # cp -af doc ${BINDIR}/${DOCDIR} || die
59 minstallfile VERSION /${DEST} || die
60
61 # only a few things in /usr/share/doc make sense to compress
62 # everything else needs to be uncompressed to be useful
63 find ${BINDIR}/${DOCDIR} -name "ChangeLog" -exec gzip -f -9 \{\} \;
64 #gzip -f -9 ${BINDIR}/${DOCDIR}/{README,ChangeLog}.* || die
65
66 minstalldocs AUTHORS BUGS COPYING NEWS README RELEASE-NOTES.txt TODO || die
67 }
68
69 postinstall()
70 {
71 build-docbook-catalog
72 }
73
74 postremove()
75 {
76 build-docbook-catalog
77 }