summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Sun2018-10-08 08:50:26 -0400
committerAndrew Sun2018-10-08 08:50:26 -0400
commit5252a0f65551cddd32936d897732676efef7b99a (patch)
treec2b86a761657ad314f4b9a06b47085dad1e2a465
downloadaur-5252a0f65551cddd32936d897732676efef7b99a.tar.gz
add mingw-w64-libbaseencode (version 1.0.9)
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD42
-rw-r--r--fix-dll-install.patch15
3 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6fe884c8bfee
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = mingw-w64-libbaseencode
+ pkgdesc = Library written in C for encoding and decoding data using base32 or base64 (RFC-4648) (mingw-w64)
+ pkgver = 1.0.9
+ pkgrel = 1
+ url = https://github.com/paolostivanin/libbaseencode
+ arch = any
+ license = GPL3
+ makedepends = mingw-w64-cmake
+ depends = mingw-w64-crt
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ source = https://github.com/paolostivanin/libbaseencode/archive/v1.0.9.tar.gz
+ source = fix-dll-install.patch
+ sha256sums = a183d7cf30d931b2a078d6f0ef64616b71ab26f9258e5f4e191778c7ace7175d
+ sha256sums = 8249f3fc0c7d66469b84339590eb68ed882a8ed1dc75cbaa62ef1b9e4a6b16aa
+
+pkgname = mingw-w64-libbaseencode
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..97f281a15cf2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Andrew Sun <adsun701@gmail.com>
+
+pkgname=mingw-w64-libbaseencode
+pkgver=1.0.9
+pkgrel=1
+pkgdesc="Library written in C for encoding and decoding data using base32 or base64 (RFC-4648) (mingw-w64)"
+arch=('any')
+url="https://github.com/paolostivanin/libbaseencode"
+license=('GPL3')
+makedepends=('mingw-w64-cmake')
+depends=('mingw-w64-crt')
+options=('!strip' '!buildflags' 'staticlibs')
+source=("https://github.com/paolostivanin/libbaseencode/archive/v${pkgver}.tar.gz"
+ "fix-dll-install.patch")
+sha256sums=('a183d7cf30d931b2a078d6f0ef64616b71ab26f9258e5f4e191778c7ace7175d'
+ '8249f3fc0c7d66469b84339590eb68ed882a8ed1dc75cbaa62ef1b9e4a6b16aa')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "${srcdir}/libbaseencode-${pkgver}"
+ patch -Np1 -i "${srcdir}/fix-dll-install.patch"
+}
+
+build() {
+ cd "${srcdir}/libbaseencode-${pkgver}"
+ for _arch in ${_architectures}; do
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-cmake ..
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/libbaseencode-${pkgver}/build-${_arch}"
+ make DESTDIR="${pkgdir}" install
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}
diff --git a/fix-dll-install.patch b/fix-dll-install.patch
new file mode 100644
index 000000000000..1e35301ee477
--- /dev/null
+++ b/fix-dll-install.patch
@@ -0,0 +1,15 @@
+diff -Naur libbaseencode-1.0.9.orig/CMakeLists.txt libbaseencode-1.0.9/CMakeLists.txt
+--- libbaseencode-1.0.9.orig/CMakeLists.txt 2018-10-07 21:52:51.816836185 -0400
++++ libbaseencode-1.0.9/CMakeLists.txt 2018-10-08 08:43:09.988477502 -0400
+@@ -25,9 +25,11 @@
+
+ include(GNUInstallDirs)
+ set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") # "lib" or "lib64"
++set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}") # "bin"
+
+ install(
+ TARGETS ${PROJECT_NAME}
++ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ COMPONENT library