pantry/projects/docbook.org/package.yml
James Reynolds 35b97da8e7
+docbook.org (#830)
* docbook.org

* Added test

* Add curl and unzip build dependency

---------

Co-authored-by: James Reynolds <magnsuviri@me.com>
2023-03-21 14:43:55 -04:00

50 lines
1.2 KiB
YAML

versions:
- 4.1.2
- 4.2
- 4.3
- 4.4
- 4.5
- 5.0
- 5.1
build:
dependencies:
curl.se: '*'
info-zip.org/unzip: '*'
script: |
if [ -e "docbook" ]; then
rm -r docbook
fi
mkdir -p docbook/xml
VERSIONS=(4.1.2 4.2 4.3 4.4 4.5 5.0 5.1) #{{ versions }}
for VERSION in "${VERSIONS[@]}"; do
case $VERSION in
4.1.2)
URL=https://docbook.org/xml/${VERSION}/docbkx412.zip
;;
4.*)
URL=https://docbook.org/xml/${VERSION}/docbook-xml-${VERSION}.zip
;;
5.0)
URL=https://docbook.org/xml/${VERSION}/docbook-${VERSION}.zip
;;
*)
URL=https://docbook.org/xml/${VERSION}/docbook-v${VERSION}-os.zip
;;
esac
curl -o docbook-$VERSION.zip $URL
unzip -d docbook/xml/${VERSION} docbook-${VERSION}.zip
rm docbook-${VERSION}.zip
done
mv docbook/xml/5.0/docbook-5.0/* docbook/xml/5.0
rmdir docbook/xml/5.0/docbook-5.0
if [ "{{prefix}}" != "" -a -e "{{prefix}}" ]; then
rm -r {{prefix}}
fi
mkdir -p {{prefix}}
mv docbook {{prefix}}
test:
script:
test -d {{prefix}}/docbook/xml