diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | 0001-cmake-remove-fixed-setting-of-LUA_COMPILER-to-luac5..patch | 25 | ||||
-rw-r--r-- | 0002-lsyncd.h-define-_BSD_SOURCE-1-define-LUA_COMPAT_5_3.patch | 24 | ||||
-rw-r--r-- | PKGBUILD | 78 | ||||
-rw-r--r-- | use-lua53.patch | 15 |
6 files changed, 74 insertions, 90 deletions
@@ -1,23 +1,19 @@ pkgbase = lsyncd pkgdesc = Live Syncing (Mirror) Daemon - pkgver = 2.3.0 + pkgver = 2.3.1 pkgrel = 1 url = https://github.com/axkibe/lsyncd - arch = i686 arch = x86_64 license = GPL2 makedepends = asciidoc - makedepends = lua makedepends = cmake - depends = lua depends = rsync - source = https://github.com/axkibe/lsyncd/archive/release-2.3.0.tar.gz + depends = lua53 + source = lsyncd-2.3.1.tar.gz::https://github.com/lsyncd/lsyncd/archive/refs/tags/v2.3.1.tar.gz source = lsyncd.service - source = 0001-cmake-remove-fixed-setting-of-LUA_COMPILER-to-luac5..patch - source = 0002-lsyncd.h-define-_BSD_SOURCE-1-define-LUA_COMPAT_5_3.patch - sha256sums = 08a1bcab041fa5d4c777ae272c72ad9917442b6e654b14ffd1a82ba0cd45e4ef + source = use-lua53.patch + sha256sums = 501f70368da8c43d3da81bf9bbb22f43dfcbc9f96b03c745842f326723c091c7 sha256sums = 538072a4505abbdf8c4d16c9200810d4a2253f892a71fc16b5cd7f35ebe1ae57 - sha256sums = e5e6731559c7a290323f5b4e1d74c7ebbfaae700509a760ed43080f7eda31c71 - sha256sums = 2b383276d158337d2e81ea188e767888ffdc78c20e3fc6932621481075015524 + sha256sums = ef55721553bdac0e3441ced58b9df1bb0d24f97513e66c12c3e94a477ba89115 pkgname = lsyncd diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..522500351caa --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +* +!.gitignore +!PKGBUILD +!.SRCINFO +!lsyncd.service +!use-lua53.patch diff --git a/0001-cmake-remove-fixed-setting-of-LUA_COMPILER-to-luac5..patch b/0001-cmake-remove-fixed-setting-of-LUA_COMPILER-to-luac5..patch deleted file mode 100644 index 11bc5d30861d..000000000000 --- a/0001-cmake-remove-fixed-setting-of-LUA_COMPILER-to-luac5..patch +++ /dev/null @@ -1,25 +0,0 @@ -From f1d2bdfebc1ed18dfab2fd58659c337395c31199 Mon Sep 17 00:00:00 2001 -From: Noel Kuntze <noel.kuntze@thermi.consulting> -Date: Sun, 10 Jul 2022 18:07:08 +0200 -Subject: [PATCH 1/2] cmake: remove fixed setting of LUA_COMPILER to luac5.3 - ---- - cmake/FindLua.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/FindLua.cmake b/cmake/FindLua.cmake -index 6628209..53333f3 100644 ---- a/cmake/FindLua.cmake -+++ b/cmake/FindLua.cmake -@@ -54,7 +54,7 @@ FIND_PROGRAM(LUA_EXECUTABLE - - # Find the lua executable - FIND_PROGRAM(LUA_COMPILER -- NAMES luac5.3 ${_POSSIBLE_LUA_COMPILER} -+ NAMES ${_POSSIBLE_LUA_COMPILER} - ) - - # Find the lua header --- -2.37.0 - diff --git a/0002-lsyncd.h-define-_BSD_SOURCE-1-define-LUA_COMPAT_5_3.patch b/0002-lsyncd.h-define-_BSD_SOURCE-1-define-LUA_COMPAT_5_3.patch deleted file mode 100644 index 7149c6304e87..000000000000 --- a/0002-lsyncd.h-define-_BSD_SOURCE-1-define-LUA_COMPAT_5_3.patch +++ /dev/null @@ -1,24 +0,0 @@ -From e6da3e24d0e80fa3e2065edc9bcbacd15807f6eb Mon Sep 17 00:00:00 2001 -From: Noel Kuntze <noel.kuntze@thermi.consulting> -Date: Sun, 10 Jul 2022 18:08:58 +0200 -Subject: [PATCH 2/2] lsyncd.h: #define _BSD_SOURCE 1, #define LUA_COMPAT_5_3 - ---- - lsyncd.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lsyncd.h b/lsyncd.h -index 9a4ec67..9ea6f72 100644 ---- a/lsyncd.h -+++ b/lsyncd.h -@@ -19,6 +19,7 @@ - - #define LUA_COMPAT_ALL - #define LUA_COMPAT_5_1 -+#define LUA_COMPAT_5_3 - - // includes needed for headerfile - #include "config.h" --- -2.37.0 - @@ -1,46 +1,62 @@ -## Maintainer: Thermi <noel[ at ] familie-kuntze.de> +# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com> +# Contributor: Thermi <noel[ at ] familie-kuntze.de> # Submitter: nullie + pkgname=lsyncd -pkgver=2.3.0 +pkgver=2.3.1 pkgrel=1 pkgdesc="Live Syncing (Mirror) Daemon" -arch=('i686' 'x86_64') +arch=(x86_64) url="https://github.com/axkibe/lsyncd" -license=('GPL2') -depends=('lua' 'rsync') -makedepends=('asciidoc' 'lua' 'cmake') -source=("https://github.com/axkibe/lsyncd/archive/release-$pkgver.tar.gz" - "lsyncd.service" - "0001-cmake-remove-fixed-setting-of-LUA_COMPILER-to-luac5..patch" - "0002-lsyncd.h-define-_BSD_SOURCE-1-define-LUA_COMPAT_5_3.patch" - ) - -sha256sums=('08a1bcab041fa5d4c777ae272c72ad9917442b6e654b14ffd1a82ba0cd45e4ef' - '538072a4505abbdf8c4d16c9200810d4a2253f892a71fc16b5cd7f35ebe1ae57' - 'e5e6731559c7a290323f5b4e1d74c7ebbfaae700509a760ed43080f7eda31c71' - '2b383276d158337d2e81ea188e767888ffdc78c20e3fc6932621481075015524') +license=(GPL2) +depends=( + rsync + lua53 +) +makedepends=( + asciidoc + cmake +) + +source=( + "$pkgname-$pkgver.tar.gz::https://github.com/lsyncd/lsyncd/archive/refs/tags/v$pkgver.tar.gz" + "lsyncd.service" + "use-lua53.patch" +) +sha256sums=( + '501f70368da8c43d3da81bf9bbb22f43dfcbc9f96b03c745842f326723c091c7' + '538072a4505abbdf8c4d16c9200810d4a2253f892a71fc16b5cd7f35ebe1ae57' + 'ef55721553bdac0e3441ced58b9df1bb0d24f97513e66c12c3e94a477ba89115' +) + +_archive="$pkgname-$pkgver" + prepare() { - cd "${pkgname}-release-${pkgver}" - for patch in "$srcdir/"*.patch - do - patch -p1 -i "$patch" - done - cmake -DCMAKE_INSTALL_PREFIX=/usr -S . -B build + cd "$_archive" + patch --forward --strip=1 --input="$srcdir/use-lua53.patch" } build() { - cd ${srcdir}/${pkgname}-release-${pkgver} - cd build - make + cd "$_archive" + + cmake -B build -S . \ + -DCMAKE_BUILD_TYPE='None' \ + -DCMAKE_INSTALL_PREFIX='/usr' \ + -Wno-dev + cmake --build build } package() { - cd "${srcdir}/${pkgname}-release-${pkgver}/build" - make DESTDIR="${pkgdir}" install - # fix the path of the man page. Urgh. - install -D "${pkgdir}/man1/lsyncd.1" "${pkgdir}/usr/share/man/man1/lsyncd.1" - rm -rf "${pkgdir}/man1" - install -m 644 -D "${srcdir}/lsyncd.service" "${pkgdir}/usr/lib/systemd/system/lsyncd.service" + cd "$_archive" + + DESTDIR="$pkgdir" cmake --install build + + install -Dm664 "${pkgdir}/man1/lsyncd.1" "${pkgdir}/usr/share/man/man1/lsyncd.1" + rm -rf "${pkgdir}/man1" + + mkdir -p "${pkgdir}/usr/share/doc/$pkgname" + cp -r "${pkgdir}/usr/doc/examples" "${pkgdir}/usr/share/doc/$pkgname/examples" + rm -rf "${pkgdir}/usr/doc" } diff --git a/use-lua53.patch b/use-lua53.patch new file mode 100644 index 000000000000..aaad484be5c4 --- /dev/null +++ b/use-lua53.patch @@ -0,0 +1,15 @@ +diff --unified --recursive --text lsyncd-2.3.1.orig/CMakeLists.txt lsyncd-2.3.1/CMakeLists.txt +--- lsyncd-2.3.1.orig/CMakeLists.txt 2023-04-16 01:22:15.765411996 +0200 ++++ lsyncd-2.3.1/CMakeLists.txt 2023-04-16 01:22:36.962131402 +0200 +@@ -12,7 +12,10 @@ + + + # finding Lua +-find_package( Lua REQUIRED ) ++set(LUA_INCLUDE_DIR /usr/include/lua5.3) ++set(LUA_EXECUTABLE /usr/bin/lua5.3) ++set(LUA_COMPILER /usr/bin/luac5.3) ++set(LUA_LIBRARIES /usr/lib/liblua5.3.so) + include_directories ( ${LUA_INCLUDE_DIR} ) + + |