summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Kauselmann2017-07-29 08:38:28 +0200
committerFelix Kauselmann2017-07-29 08:39:35 +0200
commit4465558846792681d359c80eafc53f5c30416f23 (patch)
treeeb3613211f2c9007d4472621d9a18c0b3ab3e70c
parent50b00e98c5117296241584742f1efd9c052a916d (diff)
downloadaur-4465558846792681d359c80eafc53f5c30416f23.tar.gz
Add cmakelist.txt to sources directly to avoid trouble with upstream
-rw-r--r--.SRCINFO8
-rw-r--r--CMakeLists.txt102
-rw-r--r--PKGBUILD6
3 files changed, 108 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 36a5570f1ea..5ef616c05d9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Tue Feb 2 11:34:06 UTC 2016
pkgbase = libunarr-git
pkgdesc = A lightweight decompression library with support for rar, tar and zip archives.
pkgver = r190.d1be8c4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/zeniko/unarr
arch = i686
arch = x86_64
@@ -13,9 +11,9 @@ pkgbase = libunarr-git
depends = zlib
depends = bzip2
source = git+https://github.com/zeniko/unarr
- source = https://raw.githubusercontent.com/selmf/unarr/master/CMakeLists.txt
+ source = CMakeLists.txt
md5sums = SKIP
- md5sums = 056fd95cfab5889c591f1ee53d389a97
+ md5sums = 6c8ee9f142ac9b08eb43eb6faaf65594
pkgname = libunarr-git
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000000..c8458e866b4
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,102 @@
+cmake_minimum_required(VERSION 2.6)
+project(unarr C)
+
+#Set up api and release version for later use.
+#Increase in major api version indicates api
+#breakage!! For non-breaking changes, use
+#minor api version instead.
+set (UNARR_API_VERSION_MAJOR 1)
+set (UNARR_API_VERSION_MINOR 0)
+
+#set build type to default if unset
+if( NOT CMAKE_BUILD_TYPE )
+ set( CMAKE_BUILD_TYPE Release CACHE STRING
+ "Choose the type of build, options are: None Debug Release RelWithDebInfo
+MinSizeRel."
+ FORCE )
+endif()
+
+find_package(ZLIB)
+find_package(BZip2)
+
+if (UNIX OR MINGW)
+ add_compile_options(-fomit-frame-pointer -D_FILE_OFFSET_BITS=64)
+endif (UNIX OR MINGW)
+
+if(CMAKE_BUILD_TOOL MATCHES "(make)")
+ add_definitions(-Wall -pedantic)
+endif()
+
+#sources
+
+set (HEADERS common/allocator.h
+ common/unarr-imp.h
+ rar/rar.h
+ rar/lzss.h
+ rar/rarvm.h
+ lzmasdk/LzmaDec.h
+ lzmasdk/Ppmd7.h
+ lzmasdk/CpuArch.h
+ lzmasdk/Ppmd.h
+ lzmasdk/7zTypes.h
+ lzmasdk/Ppmd8.h
+ lzmasdk/Precomp.h
+ _7z/_7z.h
+ zip/zip.h
+ zip/inflate.h
+ tar/tar.h)
+
+set (SOURCES rar/uncompress-rar.c
+ rar/huffman-rar.c
+ rar/rar.c
+ rar/filter-rar.c
+ rar/rarvm.c
+ rar/parse-rar.c
+ _7z/_7z.c
+ zip/zip.c
+ zip/inflate.c
+ zip/parse-zip.c
+ zip/uncompress-zip.c
+ tar/tar.c
+ tar/parse-tar.c
+ lzmasdk/Ppmd7.c
+ lzmasdk/Ppmd8.c
+ lzmasdk/CpuArch.c
+ lzmasdk/LzmaDec.c
+ lzmasdk/Ppmd7Dec.c
+ lzmasdk/Ppmd8Dec.c
+ common/custalloc.c
+ common/unarr.c
+ common/stream.c
+ common/conv.c
+ common/crc32.c
+ )
+
+#build targets
+
+add_library(unarr SHARED unarr.h ${HEADERS} ${SOURCES})
+add_library(unarr_static STATIC unarr.h ${HEADERS} ${SOURCES})
+set_target_properties(unarr PROPERTIES VERSION ${UNARR_API_VERSION_MAJOR}.${UNARR_API_VERSION_MINOR} SOVERSION ${UNARR_API_VERSION_MAJOR})
+set_target_properties(unarr_static PROPERTIES OUTPUT_NAME unarr VERSION ${UNARR_API_VERSION_MAJOR}.${UNARR_API_VERSION_MINOR} SOVERSION ${UNARR_API_VERSION_MAJOR})
+
+#library detection macros
+
+if (ZLIB_FOUND)
+ include_directories(${ZLIB_INCLUDE_DIRS})
+ target_link_libraries(unarr ${ZLIB_LIBRARIES})
+ target_link_libraries(unarr_static ${ZLIB_LIBRARIES})
+ add_definitions(-DHAVE_ZLIB)
+endif(ZLIB_FOUND)
+
+if (BZIP2_FOUND)
+ include_directories(${BZIP_INCLUDE_DIRS})
+ target_link_libraries (unarr ${BZIP2_LIBRARIES})
+ target_link_libraries (unarr_static ${BZIP2_LIBRARIES})
+ add_definitions(-DHAVE_BZIP2)
+endif (BZIP2_FOUND)
+
+#make install targets
+
+install(TARGETS unarr DESTINATION lib)
+install(TARGETS unarr_static DESTINATION lib)
+install(FILES unarr.h DESTINATION include) \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index 4b7124e4c02..2c088d52d22 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,12 @@
pkgname=libunarr-git
pkgver=r190.d1be8c4
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url="https://github.com/zeniko/unarr"
license=("LGPL3")
pkgdesc="A lightweight decompression library with support for rar, tar and zip archives."
source=('git+https://github.com/zeniko/unarr'
- 'https://raw.githubusercontent.com/selmf/unarr/master/CMakeLists.txt'
+ 'CMakeLists.txt'
)
makedepends=('cmake' 'git')
depends=('zlib' 'bzip2')
@@ -32,4 +32,4 @@ package() {
make DESTDIR=$pkgdir install
}
md5sums=('SKIP'
- '056fd95cfab5889c591f1ee53d389a97')
+ '6c8ee9f142ac9b08eb43eb6faaf65594')