3 %bcond_with lua # build without tests
5 Summary: Alpine Package Keeper - package manager for alpine
11 Source0: https://dev.alpinelinux.org/archive/apk-tools/%{name}-%{version}.tar.xz
12 # Source0-md5: deecb1be266f02279b8eeba74e60772a
13 Patch0: 0001-fix-strncpy-bounds-errors.patch
14 Patch1: 0002-include-sys-sysmacros.h-for-makedev-definition.patch
15 URL: https://git.alpinelinux.org/apk-tools/
16 %{?with_lua:BuildRequires: lua52-devel}
17 BuildRequires: openssl-devel
18 BuildRequires: tar >= 1:1.22
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define _sbindir /sbin
25 Package manager for Alpine Linux.
28 Summary: Lua module for apk-tools
32 Lua module for apk-tools.
42 FULL_VERSION=%{version}-%{release}
43 LUAAPK=%{?with_lua:YesPlease}
47 generate_config > config.mk
51 rm -rf $RPM_BUILD_ROOT
53 DESTDIR=$RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{_sysconfdir}/apk/{keys,protected_paths.d}
58 %{__rm} $RPM_BUILD_ROOT%{_docdir}/apk/README
61 rm -rf $RPM_BUILD_ROOT
64 %defattr(644,root,root,755)
65 %dir %{_sysconfdir}/apk
66 %dir %{_sysconfdir}/apk/keys
67 %dir %{_sysconfdir}/apk/protected_paths.d
68 %attr(755,root,root) %{_sbindir}/apk
72 %defattr(644,root,root,755)
73 # XXX: parent dir not packaged
74 %{_prefix}/lib/lua/5.2/apk.so