summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD20
1 files changed, 19 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8372273e24c..d2c3b6b96de 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ pkgname="${_pkgname}-2.3.3"
pkgdesc="Mini zip and unzip based on libbsd and zlib. Version 2.3.3 (specific version)."
_pkgver=2.3.3
pkgver="${_pkgver}"
-pkgrel=2
+pkgrel=5
arch=('x86_64')
license=('custom')
url="http://github.com/nmoinvaz/minizip"
@@ -30,13 +30,25 @@ conflicts=(
)
source=(
"${_pkgorigname}-${_pkgver}.tar.gz::https://github.com/nmoinvaz/${_pkgorigname}/archive/${_pkgver}.tar.gz"
+ "minizip.pc.rename-minizip2.patch::http://ix.io/1yQu"
)
sha256sums=(
'8c74530d3095891525f53cda6aabe1df138255ef53d0f294791cb57c2cb5710c'
+ '0700dfdb6c637b1a36cf15018a5d4d3ee92cb51d637e33341f4aaae3d4f480ad'
)
+prepare() {
+ cd "${srcdir}/${_pkgorigname}-${_pkgver}"
+
+ for _patch in 'minizip.pc.rename-minizip2.patch'; do
+ msg2 "Applying patch '${_patch}' ..."
+ patch -N -p1 --follow-symlinks -i "${srcdir}/${_patch}"
+ done
+}
+
build() {
cd "${srcdir}/${_pkgorigname}-${_pkgver}"
+
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib/minizip2 \
@@ -59,6 +71,12 @@ package() {
make DESTDIR="${pkgdir}" install
+ # install pkg-config file
+ install -d -m755 -v "${pkgdir}/usr/lib/pkgconfig"
+ pushd "${pkgdir}/usr/lib/pkgconfig"
+ ln -sv "../minizip2/pkgconfig/minizip.pc" "minizip2.pc"
+ popd
+
install -D -v -m644 README.md "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
install -D -v -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}