]> git.pld-linux.org Git - packages/apk-tools.git/commitdiff
add lua subpackage auto/th/apk-tools-2.10.1-1
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 4 Nov 2018 03:43:43 +0000 (05:43 +0200)
committerElan Ruusamäe <glen@pld-linux.org>
Sun, 4 Nov 2018 03:45:37 +0000 (05:45 +0200)
apk-tools.spec

index 543d4ae3edf478789982279f4189f0849d5ba017..afac4549c7ed1c21968f62b0a867532df4efd7b4 100644 (file)
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_with    lua             # build without tests
+
 Summary:       Alpine Package Keeper - package manager for alpine
 Name:          apk-tools
 Version:       2.10.1
@@ -10,6 +14,7 @@ Patch0:               0001-fix-strncpy-bounds-errors.patch
 Patch1:                0002-include-sys-sysmacros.h-for-makedev-definition.patch
 Patch2:                0001-add-support-for-openssl-1.1.patch
 URL:           https://git.alpinelinux.org/cgit/apk-tools/
+BuildRequires: lua52-devel
 BuildRequires: openssl-devel
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
@@ -20,6 +25,13 @@ BuildRoot:   %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %description
 Package manager for Alpine Linux.
 
+%package lua
+Summary:       Lua module for apk-tools
+Group:         Base
+
+%description lua
+Lua module for apk-tools.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -27,6 +39,14 @@ Package manager for Alpine Linux.
 %patch2 -p1
 
 %build
+generate_config() {
+cat <<-EOF
+       FULL_VERSION=%{version}-%{release}
+       LUAAPK=%{?with_lua:YesPlease}
+       export LUAAPK
+EOF
+}
+generate_config > config.mk
 %{__make}
 
 %install
@@ -43,3 +63,10 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/apk
+
+%if %{with lua}
+%files lua
+%defattr(644,root,root,755)
+# XXX: parent dir not packaged
+%{_prefix}/lib/lua/5.2/apk.so
+%endif
This page took 0.071722 seconds and 4 git commands to generate.