]> git.pld-linux.org Git - packages/apk-tools.git/blob - apk-tools.spec
- up to 2.10.5
[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.5
8 Release:        1
9 License:        GPL v2
10 Group:          Base
11 Source0:        https://dev.alpinelinux.org/archive/apk-tools/%{name}-%{version}.tar.xz
12 # Source0-md5:  6ae9263da44456776ff4836ad5b4c571
13 Patch0:         no-Werror.patch
14 URL:            https://git.alpinelinux.org/apk-tools/
15 %{?with_lua:BuildRequires:      lua52-devel}
16 BuildRequires:  openssl-devel
17 BuildRequires:  tar >= 1:1.22
18 BuildRequires:  xz
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _sbindir /sbin
22
23 %description
24 Package manager for Alpine Linux.
25
26 %package lua
27 Summary:        Lua module for apk-tools
28 Group:          Base
29
30 %description lua
31 Lua module for apk-tools.
32
33 %prep
34 %setup -q
35 %patch0 -p1
36
37 %build
38 generate_config() {
39 cat <<-EOF
40         FULL_VERSION=%{version}-%{release}
41         LUAAPK=%{?with_lua:YesPlease}
42         export LUAAPK
43 EOF
44 }
45 generate_config > config.mk
46 %{__make} \
47         V=1 \
48         CFLAGS="%{rpmcflags}"
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 %{__make} install \
53         V=1 \
54         CFLAGS="%{rpmcflags}" \
55         DESTDIR=$RPM_BUILD_ROOT
56
57 install -d $RPM_BUILD_ROOT%{_sysconfdir}/apk/{keys,protected_paths.d}
58
59 # empty file
60 %{__rm} $RPM_BUILD_ROOT%{_docdir}/apk/README
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %files
66 %defattr(644,root,root,755)
67 %dir %{_sysconfdir}/apk
68 %dir %{_sysconfdir}/apk/keys
69 %dir %{_sysconfdir}/apk/protected_paths.d
70 %attr(755,root,root) %{_sbindir}/apk
71
72 %if %{with lua}
73 %files lua
74 %defattr(644,root,root,755)
75 # XXX: parent dir not packaged
76 %{_prefix}/lib/lua/5.2/apk.so
77 %endif
This page took 0.067799 seconds and 4 git commands to generate.