diff options
author | kfg | 2015-06-10 19:06:54 +0200 |
---|---|---|
committer | kfg | 2015-06-10 19:06:54 +0200 |
commit | 3ee6e87e68c1eeb7a1394d4e34862116199b2efb (patch) | |
tree | 4ae2cb94ce371155dd0c8aa48418b849083d5bf8 | |
download | aur-3ee6e87e68c1eeb7a1394d4e34862116199b2efb.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 73 | ||||
-rw-r--r-- | mingw-DATADIR-conflict.patch | 24 | ||||
-rw-r--r-- | mingw-as-unix.patch | 61 | ||||
-rw-r--r-- | mingw-w64-pthreads.patch | 11 |
5 files changed, 198 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cf6dc91cbc14 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = mingw-w64-libssh + pkgdesc = Library for accessing ssh client services through C libraries (mingw-w64) + pkgver = 0.6.4 + pkgrel = 1 + url = http://www.libssh.org/ + arch = any + license = LGPL + makedepends = mingw-w64-gcc + makedepends = mingw-w64-cmake + makedepends = mingw-w64-pkg-config + makedepends = doxygen + depends = mingw-w64-zlib + depends = mingw-w64-openssl + options = !strip + options = !buildflags + options = staticlibs + source = https://red.libssh.org/attachments/download/107/libssh-0.6.4.tar.gz + source = https://red.libssh.org/attachments/download/108/libssh-0.6.4.tar.asc + source = mingw-w64-pthreads.patch + source = mingw-as-unix.patch + source = mingw-DATADIR-conflict.patch + md5sums = 8a7daa171c69913f475dacffcb639fda + md5sums = SKIP + md5sums = ca268e1366633f988e21cbcf5a4d8145 + md5sums = d819f18cb4ae07ad2a6589b02765b6c2 + md5sums = 7be13e00d27ce77f862012ee0654019b + +pkgname = mingw-w64-libssh + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4a908fbb44aa --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,73 @@ +# Maintainer: Karl-Felix Glatzer <karl.glatzer@gmx.de> +# Contributor: Tom Gundersen <teg@jklm.no> +# Contributor: Andrea Scarpino <andrea@archlinux.org> +# Contributor: ice-man <icemanf@gmail.com> +# Contributor: sergeantspoon <sergeantspoon@archlinux.us> +# Contributor: Alexey Pavlov <alexpux@gmail.com> + +pkgname=mingw-w64-libssh +pkgver=0.6.4 +pkgrel=1 +pkgdesc="Library for accessing ssh client services through C libraries (mingw-w64)" +url="http://www.libssh.org/" +license=('LGPL') +arch=('any') +depends=('mingw-w64-zlib' 'mingw-w64-openssl') +makedepends=('mingw-w64-gcc' 'mingw-w64-cmake' 'mingw-w64-pkg-config' 'doxygen') +options=(!strip !buildflags staticlibs) +#cmocka +#checkdepends=('openssh') +source=(https://red.libssh.org/attachments/download/107/libssh-${pkgver}.tar.gz + https://red.libssh.org/attachments/download/108/libssh-${pkgver}.tar.asc + mingw-w64-pthreads.patch + mingw-as-unix.patch + mingw-DATADIR-conflict.patch) +md5sums=('8a7daa171c69913f475dacffcb639fda' + 'SKIP' + 'ca268e1366633f988e21cbcf5a4d8145' + 'd819f18cb4ae07ad2a6589b02765b6c2' + '7be13e00d27ce77f862012ee0654019b') +validpgpkeys=('8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D') # Andreas Schneider <asn@cryptomilk.org> +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare() { + # disable the test. It is confused by our clean container setup. + # 'extra-x86-build' uses user 'nobody' that has a record in /etc/passwd file + # but $HOME envvar is set to '/build'. The test expects that $HOME corresponds to passwd file. + sed 's/unit_test(torture_path_expand_tilde_unix),//' -i libssh-${pkgver}/tests/unittests/torture_misc.c + + cd "${srcdir}/libssh-${pkgver}" + + patch -p1 -i ${srcdir}/mingw-w64-pthreads.patch + patch -p1 -i ${srcdir}/mingw-as-unix.patch + patch -p1 -i ${srcdir}/mingw-DATADIR-conflict.patch +} + +build() { + for _arch in ${_architectures}; do + mkdir -p "${srcdir}"/build-${_arch} && cd "${srcdir}"/build-${_arch} + + ${_arch}-cmake ../libssh-${pkgver} \ + -DCMAKE_INSTALL_PREFIX=/usr/${_arch} \ + -DCMAKE_BUILD_TYPE=Release \ + -DWITH_GSSAPI=OFF \ + -DWITH_STATIC_LIB=ON + + #-DWITH_TESTING=ON + make + done +} + +#TODO: Test with wine? +#check() { +# cd build +# make test +#} + +package(){ + for _arch in ${_architectures}; do + cd "${srcdir}"/build-${_arch} + + make DESTDIR="${pkgdir}" install + done +} diff --git a/mingw-DATADIR-conflict.patch b/mingw-DATADIR-conflict.patch new file mode 100644 index 000000000000..ee3ce8ef850e --- /dev/null +++ b/mingw-DATADIR-conflict.patch @@ -0,0 +1,24 @@ +diff -Naur libssh-0.6.4-orig/config.h.cmake libssh-0.6.4/config.h.cmake +--- libssh-0.6.4-orig/config.h.cmake 2014-12-19 11:11:17.000000000 +0300 ++++ libssh-0.6.4/config.h.cmake 2014-12-25 14:10:49.834000000 +0300 +@@ -5,7 +5,7 @@ + #cmakedefine VERSION "${APPLICATION_VERSION}" + + #cmakedefine LOCALEDIR "${LOCALE_INSTALL_DIR}" +-#cmakedefine DATADIR "${DATADIR}" ++#cmakedefine DATA_DIR "${DATA_DIR}" + #cmakedefine LIBDIR "${LIBDIR}" + #cmakedefine PLUGINDIR "${PLUGINDIR}" + #cmakedefine SYSCONFDIR "${SYSCONFDIR}" +diff -Naur libssh-0.6.4-orig/ConfigureChecks.cmake libssh-0.6.4/ConfigureChecks.cmake +--- libssh-0.6.4-orig/ConfigureChecks.cmake 2014-12-19 11:11:17.000000000 +0300 ++++ libssh-0.6.4/ConfigureChecks.cmake 2014-12-25 14:11:05.297000000 +0300 +@@ -8,7 +8,7 @@ + + set(PACKAGE ${APPLICATION_NAME}) + set(VERSION ${APPLICATION_VERSION}) +-set(DATADIR ${DATA_INSTALL_DIR}) ++set(DATA_DIR ${DATA_INSTALL_DIR}) + set(LIBDIR ${LIB_INSTALL_DIR}) + set(PLUGINDIR "${PLUGIN_INSTALL_DIR}-${LIBRARY_SOVERSION}") + set(SYSCONFDIR ${SYSCONF_INSTALL_DIR}) diff --git a/mingw-as-unix.patch b/mingw-as-unix.patch new file mode 100644 index 000000000000..7996412280e9 --- /dev/null +++ b/mingw-as-unix.patch @@ -0,0 +1,61 @@ +diff -Naur libssh-0.6.4-orig/cmake/Modules/DefineInstallationPaths.cmake libssh-0.6.4/cmake/Modules/DefineInstallationPaths.cmake +--- libssh-0.6.4-orig/cmake/Modules/DefineInstallationPaths.cmake 2014-09-15 22:54:34.000000000 +0400 ++++ libssh-0.6.4/cmake/Modules/DefineInstallationPaths.cmake 2014-12-25 12:45:52.735000000 +0300 +@@ -1,4 +1,4 @@ +-if (UNIX OR OS2) ++if (UNIX OR OS2 OR MINGW) + IF (NOT APPLICATION_NAME) + MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME") + SET(APPLICATION_NAME ${PROJECT_NAME}) +diff -Naur libssh-0.6.4-orig/CMakeLists.txt libssh-0.6.4/CMakeLists.txt +--- libssh-0.6.4-orig/CMakeLists.txt 2014-12-19 11:11:27.000000000 +0300 ++++ libssh-0.6.4/CMakeLists.txt 2014-12-25 12:41:43.298000000 +0300 +@@ -84,8 +84,8 @@ + add_subdirectory(src) + + # pkg-config file +-configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc) +-configure_file(libssh_threads.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc) ++configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc @ONLY) ++configure_file(libssh_threads.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc @ONLY) + install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc +diff -Naur libssh-0.6.4-orig/libssh.pc.cmake libssh-0.6.4/libssh.pc.cmake +--- libssh-0.6.4-orig/libssh.pc.cmake 2013-02-07 22:23:14.000000000 +0400 ++++ libssh-0.6.4/libssh.pc.cmake 2014-12-25 12:44:04.023000000 +0300 +@@ -1,6 +1,11 @@ +-Name: ${APPLICATION_NAME} ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix}/bin ++libdir=@LIB_INSTALL_DIR@ ++includedir=@INCLUDE_INSTALL_DIR@ ++ ++Name: @APPLICATION_NAME@ + Description: The SSH Library +-Version: ${APPLICATION_VERSION} +-Libs: -L${LIB_INSTALL_DIR} -lssh +-Cflags: -I${INCLUDE_INSTALL_DIR} ++Version: @APPLICATION_VERSION@ ++Libs: -L${libdir} -lssh ++Cflags: -I${includedir} + +diff -Naur libssh-0.6.4-orig/libssh_threads.pc.cmake libssh-0.6.4/libssh_threads.pc.cmake +--- libssh-0.6.4-orig/libssh_threads.pc.cmake 2014-09-15 22:54:34.000000000 +0400 ++++ libssh-0.6.4/libssh_threads.pc.cmake 2014-12-25 12:43:12.932000000 +0300 +@@ -1,6 +1,11 @@ +-Name: ${APPLICATION_NAME}_threads ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix}/bin ++libdir=@LIB_INSTALL_DIR@ ++includedir=@INCLUDE_INSTALL_DIR@ ++ ++Name: @APPLICATION_NAME@_threads + Description: The SSH Library Thread Extension +-Version: ${APPLICATION_VERSION} +-Libs: -L${LIB_INSTALL_DIR} -lssh_threads +-Cflags: -I${INCLUDE_INSTALL_DIR} ++Version: @APPLICATION_VERSION@ ++Libs: -L${libdir} -lssh_threads ++Cflags: -I${includedir} + diff --git a/mingw-w64-pthreads.patch b/mingw-w64-pthreads.patch new file mode 100644 index 000000000000..36c60451b3bb --- /dev/null +++ b/mingw-w64-pthreads.patch @@ -0,0 +1,11 @@ +--- libssh-0.6.3/src/threads/pthread.c.orig 2014-03-16 23:41:28.498600000 +0400 ++++ libssh-0.6.3/src/threads/pthread.c 2014-03-16 23:41:53.318200000 +0400 +@@ -75,7 +75,7 @@ + } + + static unsigned long ssh_pthread_thread_id (void){ +-#if _WIN32 ++#if defined(_WIN32) && !defined(__MINGW32__) + return (unsigned long) pthread_self().p; + #else + return (unsigned long) pthread_self(); |