Magellan Linux

Annotation of /branches/R11-unstable/extras/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.2-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32828 - (hide annotations) (download)
Mon Apr 29 13:46:06 2019 UTC (5 years ago) by niro
File size: 2047 byte(s)
-release branches/R11-unstable
1 niro 30021 # $Id$
2    
3     PNAME="docbook-xsl-stylesheets"
4     PVER="1.79.2"
5     PBUILD="r2"
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     >= dev-libs/libxslt-1.1.28
14     >= app-text/build-docbook-catalog-1.4"
15    
16     SRCFILE="docbook-xsl-nons-${PVER}.tar.bz2"
17     SRCDIR="${BUILDDIR}/docbook-xsl-nons-${PVER}"
18    
19     sminclude mtools
20    
21     SRC_URI=(
22     https://github.com/docbook/xslt10-stylesheets/releases/download/release%2F${PVER}/${SRCFILE}
23     mirror://${PNAME}/${SRCFILE}
24     mirror://${PNAME}/${PNAME}-${PVER}-non-recursive.patch
25     )
26    
27     UP2DATE="updatecmd https://github.com/docbook/xslt10-stylesheets/releases | highesttarball"
28    
29     src_prepare()
30     {
31     munpack ${SRCFILE} || die
32     cd ${SRCDIR}
33    
34     # fix recursive loops, which may segfault
35     mpatch ${PNAME}-${PVER}-non-recursive.patch || die
36     }
37    
38     src_install()
39     {
40     cd ${SRCDIR}
41    
42     local DEST="/usr/share/sgml/docbook/xsl-stylesheets"
43     local DOCDIR="/usr/share/doc/${PNAME}-${PVER}"
44    
45     # needed directories
46     minstalldir /${DEST} || die
47     minstalldir /${DOCDIR} || die
48    
49     local sheets="$(find ${SRCDIR} -maxdepth 1 -mindepth 1 -type d -printf '%f \n')"
50    
51     for i in ${sheets}
52     do
53     cd ${SRCDIR}
54     cp -af ${i} ${BINDIR}/${DEST} || die
55     cd ${BINDIR}/${DEST}/${i} || die
56    
57     [ -e ChangeLog ] && { mv ChangeLog ${BINDIR}/${DOCDIR}/ChangeLog.${i} || die; }
58     [ -e README ] && { mv README ${BINDIR}/${DOCDIR}/README.${i} || die; }
59     done
60    
61     # install the documentation
62     cd ${SRCDIR}
63     # that's now an extra tarball, we don't need it anyway
64     # cp -af doc ${BINDIR}/${DOCDIR} || die
65     minstallfile VERSION /${DEST} || die
66     # fixe missing file
67     mlink VERSION /${DEST}/VERSION.xsl || die
68    
69     # only a few things in /usr/share/doc make sense to compress
70     # everything else needs to be uncompressed to be useful
71     find ${BINDIR}/${DOCDIR} -name "ChangeLog" -exec gzip -f -9 \{\} \;
72     #gzip -f -9 ${BINDIR}/${DOCDIR}/{README,ChangeLog}.* || die
73    
74     minstalldocs AUTHORS BUGS COPYING NEWS README RELEASE-NOTES.txt TODO || die
75     }
76    
77     postinstall()
78     {
79     build-docbook-catalog
80     }
81    
82     postremove()
83     {
84     build-docbook-catalog
85     }