]> git.pld-linux.org Git - packages/apk-tools.git/blob - apk-tools.spec
add lua subpackage
[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.1
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:  d14969082e880bd056644f73ac3b3eb2
13 Patch0:         0001-fix-strncpy-bounds-errors.patch
14 Patch1:         0002-include-sys-sysmacros.h-for-makedev-definition.patch
15 Patch2:         0001-add-support-for-openssl-1.1.patch
16 URL:            https://git.alpinelinux.org/cgit/apk-tools/
17 BuildRequires:  lua52-devel
18 BuildRequires:  openssl-devel
19 BuildRequires:  tar >= 1:1.22
20 BuildRequires:  xz
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         _sbindir /sbin
24
25 %description
26 Package manager for Alpine Linux.
27
28 %package lua
29 Summary:        Lua module for apk-tools
30 Group:          Base
31
32 %description lua
33 Lua module for apk-tools.
34
35 %prep
36 %setup -q
37 %patch0 -p1
38 %patch1 -p1
39 %patch2 -p1
40
41 %build
42 generate_config() {
43 cat <<-EOF
44         FULL_VERSION=%{version}-%{release}
45         LUAAPK=%{?with_lua:YesPlease}
46         export LUAAPK
47 EOF
48 }
49 generate_config > config.mk
50 %{__make}
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 %{__make} install \
55         DESTDIR=$RPM_BUILD_ROOT
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 %attr(755,root,root) %{_sbindir}/apk
66
67 %if %{with lua}
68 %files lua
69 %defattr(644,root,root,755)
70 # XXX: parent dir not packaged
71 %{_prefix}/lib/lua/5.2/apk.so
72 %endif
This page took 0.586651 seconds and 3 git commands to generate.