summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChocobo12019-06-09 01:11:45 +0800
committerChocobo12019-06-09 01:21:07 +0800
commita7906bb091862f1124aee487ff9ae3e9b1d414e6 (patch)
treed3cb2888f71b1ac143b998652b91e52cbeba767c
downloadaur-a7906bb091862f1124aee487ff9ae3e9b1d414e6.tar.gz
newpkg: libcloudstorage 1.2-1
-rw-r--r--.SRCINFO22
-rw-r--r--0001-Fix-compilation-with-newer-crypto.patch25
-rw-r--r--PKGBUILD36
3 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5890068c178d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = libcloudstorage
+ pkgdesc = C++ library providing access to files located in various cloud services
+ pkgver = 1.2
+ pkgrel = 1
+ url = https://code.videolan.org/videolan/libcloudstorage
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ depends = crypto++
+ depends = curl
+ depends = fuse3
+ depends = jsoncpp
+ depends = libmicrohttpd
+ depends = mega-sdk
+ depends = tinyxml2
+ source = https://code.videolan.org/videolan/libcloudstorage/-/archive/1.2/libcloudstorage-1.2.tar.bz2
+ source = 0001-Fix-compilation-with-newer-crypto.patch
+ sha256sums = 2ce657cb03ad46cc97b11db1acf13ee1abe0b22869eb602358b34743617d3a4e
+ sha256sums = a12406b7e429fa6fa7ed60f85a4a7bb936664890886003b3a86f462b007af373
+
+pkgname = libcloudstorage
+
diff --git a/0001-Fix-compilation-with-newer-crypto.patch b/0001-Fix-compilation-with-newer-crypto.patch
new file mode 100644
index 000000000000..fc8556c84281
--- /dev/null
+++ b/0001-Fix-compilation-with-newer-crypto.patch
@@ -0,0 +1,25 @@
+From 7bf715455f30fd5f3e1935f5d2f497ce29c7510b Mon Sep 17 00:00:00 2001
+From: Chocobo1 <Chocobo1@users.noreply.github.com>
+Date: Sun, 9 Jun 2019 01:15:36 +0800
+Subject: [PATCH] Fix compilation with newer crypto++
+
+---
+ src/Utility/CryptoPP.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Utility/CryptoPP.cpp b/src/Utility/CryptoPP.cpp
+index 5900024..a2b3939 100644
+--- a/src/Utility/CryptoPP.cpp
++++ b/src/Utility/CryptoPP.cpp
+@@ -42,7 +42,7 @@ std::string CryptoPP::sha256(const std::string& message) {
+ std::string CryptoPP::hmac_sha256(const std::string& key,
+ const std::string& message) {
+ std::string mac;
+- ::CryptoPP::HMAC<::CryptoPP::SHA256> hmac((byte*)key.c_str(), key.length());
++ ::CryptoPP::HMAC<::CryptoPP::SHA256> hmac((::CryptoPP::byte*)key.c_str(), key.length());
+ ::CryptoPP::StringSource(
+ message, true,
+ new ::CryptoPP::HashFilter(hmac, new ::CryptoPP::StringSink(mac)));
+--
+2.21.0
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..dd2c564ea0a8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
+
+pkgname=libcloudstorage
+pkgver=1.2
+pkgrel=1
+pkgdesc="C++ library providing access to files located in various cloud services"
+arch=('i686' 'x86_64')
+url="https://code.videolan.org/videolan/libcloudstorage"
+license=('LGPL')
+depends=('crypto++' 'curl' 'fuse3' 'jsoncpp' 'libmicrohttpd' 'mega-sdk' 'tinyxml2')
+source=("https://code.videolan.org/videolan/libcloudstorage/-/archive/$pkgver/libcloudstorage-$pkgver.tar.bz2"
+ "0001-Fix-compilation-with-newer-crypto.patch")
+sha256sums=('2ce657cb03ad46cc97b11db1acf13ee1abe0b22869eb602358b34743617d3a4e'
+ 'a12406b7e429fa6fa7ed60f85a4a7bb936664890886003b3a86f462b007af373')
+
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ patch -Np1 -i "$srcdir/0001-Fix-compilation-with-newer-crypto.patch"
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ ./bootstrap
+ ./configure \
+ --prefix="/usr"
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+}