summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorxantares2015-06-08 22:35:17 +0200
committerxantares2015-06-08 22:35:17 +0200
commitaf4d36a44cc5f8dd0a33b3e359118b8345304a6d (patch)
tree1a8f6030cf47d712b2671ea386738fc9e4218cd7 /PKGBUILD
downloadaur-af4d36a44cc5f8dd0a33b3e359118b8345304a6d.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..6152dbd8ac4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+pkgname=mingw-w64-bzip2
+pkgver=1.0.6
+pkgrel=8
+pkgdesc="A high-quality data compression program (mingw-w64)"
+arch=(any)
+url="http://sources.redhat.com/bzip2"
+license=("custom")
+makedepends=(mingw-w64-configure)
+depends=(mingw-w64-crt)
+options=(!strip !buildflags staticlibs)
+source=("http://www.bzip.org/${pkgver}/bzip2-${pkgver}.tar.gz"
+ "bzip2-1.0.5-autoconfiscated.patch"
+ "bzip2-use-cdecl-calling-convention.patch"
+ "mingw32-bzip2-1.0.5-slash.patch")
+sha1sums=('3f89f861209ce81a6bab1fd1998c0ef311712002'
+ '4d512b19b802d328037bf957c18866471c092e84'
+ 'f73d45bb02741cf0cfa995ac46547b34aedf5343'
+ '809c3a95f6f6c26463d804b345d62eed8420c6a6')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "$srcdir/bzip2-$pkgver"
+ rm -f autogen.sh README.autotools configure.ac Makefile.am bzip2.pc.in
+ patch -p1 -i "$srcdir/"bzip2-1.0.5-autoconfiscated.patch
+ patch bzlib.h < "$srcdir/"bzip2-use-cdecl-calling-convention.patch
+ patch bzip2.c < "$srcdir/"mingw32-bzip2-1.0.5-slash.patch
+ sh autogen.sh
+}
+
+build() {
+ cd "$srcdir/bzip2-$pkgver"
+ for _arch in ${_architectures}; do
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-configure
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/bzip2-${pkgver}/build-${_arch}"
+ make DESTDIR="$pkgdir" install
+ rm -r "$pkgdir/usr/${_arch}/share"
+ rm "$pkgdir/usr/${_arch}/bin/bz"{diff,grep,more}
+ rm "$pkgdir"/usr/${_arch}/bin/*.exe
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}