Created
May 25, 2018 16:41
-
-
Save pulecp/89d97a2ed61804f2121a72de60f11501 to your computer and use it in GitHub Desktop.
Build RPM package of wkhtmltopdf tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/ | |
SRC_FILE=wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
WORK_DIR=wkhtmltox | |
VERSION=0.12.4 | |
[ -f $SRC_FILE ] || wget "${URL}${SRC_FILE}" | |
rm -rf $WORK_DIR | |
tar -xf $SRC_FILE | |
rm -f *.rpm | |
cd $WORK_DIR | |
fpm -s dir \ | |
-t rpm \ | |
-n wkhtmltopdf \ | |
--iteration 1 \ | |
--version $VERSION \ | |
--no-rpm-autoreqprov \ | |
--architecture 'x86_64' \ | |
--description 'Simple shell utility to convert html to pdf using the webkit rendering engine, and qt.' \ | |
--rpm-use-file-permissions \ | |
--rpm-user root \ | |
--rpm-group root \ | |
bin/wkhtmltopdf=/usr/bin/wkhtmltopdf | |
mv *.rpm ../ | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment