]> git.pld-linux.org Git - packages/apk-tools.git/blob - apk-tools.spec
package /etc/apk/{keys,protected_paths.d} dirs
[packages/apk-tools.git] / apk-tools.spec
1 #
2 # Conditional build:
3 %bcond_with     lua             # build without tests
4
5 Summary:        Alpine Package Keeper - package manager for alpine
6 Name:           apk-tools
7 Version:        2.10.3
8 Release:        3
9 License:        GPL v2
10 Group:          Base
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
19 BuildRequires:  xz
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %define         _sbindir /sbin
23
24 %description
25 Package manager for Alpine Linux.
26
27 %package lua
28 Summary:        Lua module for apk-tools
29 Group:          Base
30
31 %description lua
32 Lua module for apk-tools.
33
34 %prep
35 %setup -q
36 %patch0 -p1
37 %patch1 -p1
38
39 %build
40 generate_config() {
41 cat <<-EOF
42         FULL_VERSION=%{version}-%{release}
43         LUAAPK=%{?with_lua:YesPlease}
44         export LUAAPK
45 EOF
46 }
47 generate_config > config.mk
48 %{__make}
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 %{__make} install \
53         DESTDIR=$RPM_BUILD_ROOT
54
55 install -d $RPM_BUILD_ROOT%{_sysconfdir}/apk/{keys,protected_paths.d}
56
57 # empty file
58 %{__rm} $RPM_BUILD_ROOT%{_docdir}/apk/README
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %files
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
69
70 %if %{with lua}
71 %files lua
72 %defattr(644,root,root,755)
73 # XXX: parent dir not packaged
74 %{_prefix}/lib/lua/5.2/apk.so
75 %endif
This page took 0.054008 seconds and 3 git commands to generate.