30 lines
1.5 KiB
Bash
30 lines
1.5 KiB
Bash
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
|
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
|
|
|
# The prepare function is executed in the root of the temp directory
|
|
# This function is used for putting downloaded files to the correct location or applying patches
|
|
prepare() {
|
|
cd "$BPM_SOURCE"
|
|
patch -Np2 -i "$BPM_WORKDIR"/765567_non-recursive_string_subst.patch
|
|
}
|
|
|
|
# The package function is executed in the source directory
|
|
# This function is used to move the compiled files into the output directory
|
|
package() {
|
|
install -dvm755 "$BPM_OUTPUT"/usr/share/xml/docbook/xsl-stylesheets-nons-${BPM_PKG_VERSION}
|
|
install -m644 "$BPM_SOURCE"/VERSION{,.xsl} -t "$BPM_OUTPUT"/usr/share/xml/docbook/xsl-stylesheets-nons-${BPM_PKG_VERSION}
|
|
(
|
|
shopt -s nullglob
|
|
for i in assembly common eclipse epub epub3 fo highlighting html \
|
|
htmlhelp javahelp lib manpages params profiling roundtrip template \
|
|
website xhtml xhtml-1_1 xhtml5
|
|
do
|
|
install -Dm644 ./"$i"/*.{xml,xsl,dtd,ent} -t "$BPM_OUTPUT"/usr/share/xml/docbook/xsl-stylesheets-nons-${BPM_PKG_VERSION}/"$i"
|
|
done
|
|
)
|
|
|
|
# Install package license
|
|
install -Dm644 COPYING "$BPM_OUTPUT"/usr/share/licenses/docbook-xsl-nons/COPYING
|
|
}
|