summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorosfans2017-05-16 17:49:19 +0800
committerosfans2017-05-16 17:49:19 +0800
commit6871cf3d0b88ad281de34b62c53d7ff69cfe9148 (patch)
tree89096c35c58b25a4afc0be9da44d2742500b73e9
downloadaur-6871cf3d0b88ad281de34b62c53d7ff69cfe9148.tar.gz
Init 1.18
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD36
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8c966b9f7d3a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Tue May 16 09:48:58 UTC 2017
+pkgbase = mingw-w64-leveldb
+ pkgdesc = A fast and lightweight key/value database library (mingw-w64)
+ pkgver = 1.18
+ pkgrel = 1
+ url = https://github.com/google/leveldb
+ arch = any
+ license = MPL
+ makedepends = git
+ makedepends = mingw-w64-gcc
+ makedepends = make
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ source = leveldb::git+https://github.com/GamerSg/leveldb-mingw.git
+ md5sums = SKIP
+
+pkgname = mingw-w64-leveldb
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0147834d0925
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: osfans <waxaca@163.com>
+_pkgname=leveldb
+pkgname=mingw-w64-${_pkgname}
+pkgver=1.18
+pkgrel=1
+pkgdesc="A fast and lightweight key/value database library (mingw-w64)"
+arch=(any)
+url="https://github.com/google/leveldb"
+license=('MPL')
+makedepends=('git' 'mingw-w64-gcc' 'make')
+options=(!strip !buildflags staticlibs)
+source=("$_pkgname::git+https://github.com/GamerSg/leveldb-mingw.git")
+md5sums=('SKIP')
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+package() {
+ cd "$_pkgname"
+ chmod +x build_detect_platform
+ sed -i 's/^PLATFORM_.*=$/#\0/' build_detect_platform
+ sed -i 's/^PLATFORM_SHARED_.*$/#\0/' build_detect_platform
+
+ for _arch in ${_architectures}; do
+ env TARGET_OS=OS_WINDOWS_CROSSCOMPILE \
+ CC=$_arch-gcc CXX=$_arch-g++ \
+ AR=$_arch-ar LD=$_arch-ld \
+ PLATFORM_SHARED_EXT=dll \
+ PLATFORM_SHARED_LDFLAGS="-shared -Wl,--out-implib,libleveldb.dll.a -Wl,-soname -Wl," \
+ make -j8
+ mkdir -p $pkgdir/usr/${_arch}/{lib,bin}
+ cp -r include $pkgdir/usr/${_arch}/include
+ cp *.a $pkgdir/usr/${_arch}/lib/
+ cp *.dll $pkgdir/usr/${_arch}/bin/
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}