[packages/apk-tools] add lua subpackage
glen
glen at pld-linux.org
Sun Nov 4 04:45:46 CET 2018
commit eccca299521804cf8a354ee6209965aa03400fd5
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Sun Nov 4 05:43:43 2018 +0200
add lua subpackage
apk-tools.spec | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
---
diff --git a/apk-tools.spec b/apk-tools.spec
index 543d4ae..afac454 100644
--- a/apk-tools.spec
+++ b/apk-tools.spec
@@ -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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/apk-tools.git/commitdiff/eccca299521804cf8a354ee6209965aa03400fd5
More information about the pld-cvs-commit
mailing list