-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathlpf.spec
144 lines (110 loc) · 4.25 KB
/
lpf.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
%global commit 1478565e7235c1a46e1f7762095143465440d04e
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: lpf
Version: 0
Release: 99.%{shortcommit}%{?dist}
Summary: Local package factory - build non-redistributable rpms
# Icon from iconarchive.com
License: MIT
URL: https://github.com/leamas/lpf
Group: Development/Tools
Source0: %{url}/archive/%{commit}/lpf-0-%{shortcommit}.tar.gz
BuildArch: noarch
BuildRequires: appdata-tools
BuildRequires: desktop-file-utils
Buildrequires: python2-devel
Requires: hicolor-icon-theme
Requires: inotify-tools
Requires: polkit
Requires: procps-ng
Requires: rpmdevtools
Requires: rpm-build
Requires: shadow-utils
Requires: sudo
Requires: dnf-plugins-core
Requires: zenity
Requires(pre): shadow-utils
%description
lpf (Local Package Factory) is designed to handle two separate
problems:
- Packages built from sources which does not allow redistribution.
- Packages requiring user to accept EULA-like terms.
It works by downloading sources, possibly requiring a user to accept
license terms and then building and installing rpm package(s) locally.
Besides being interactive the operation is similar to akmod and dkms
%prep
%setup -qn lpf-%{commit}
rm -rf examples
%build
%install
make DESTDIR=%{buildroot} install
desktop-file-validate %{buildroot}%{_datadir}/applications/lpf.desktop
%check
appstream-util validate-relax appdata/lpf.appdata.xml
%pre
getent group pkg-build >/dev/null || groupadd -r pkg-build
getent passwd pkg-build >/dev/null || \
useradd -r -g pkg-build -d /var/lib/lpf -s /sbin/nologin \
-c "lpf local package build user" pkg-build
exit 0
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/lpf scan || :
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%doc README.md LICENSE
%{_bindir}/lpf
%{_bindir}/lpf-gui
/usr/lib/rpm/macros.d/macros.lpf
%{_datadir}/lpf
%{_datadir}/applications/lpf.desktop
%{_datadir}/applications/lpf-gui.desktop
%{_datadir}/applications/lpf-notify.desktop
%{_datadir}/icons/hicolor/*/apps/lpf*.png
#%%{_datadir}/appdata/appdata.xml # No sane owner to depend on.
%{_datadir}/appdata
%{_datadir}/man/man1/lpf*
%{_libexecdir}/lpf-kill-pgroup
# fedpkg import does not accept /etc ATM.
%attr(440, root, root) %config(noreplace) %{_sysconfdir}/sudoers.d/pkg-build
%attr(2775, pkg-build, pkg-build)/var/lib/lpf
%changelog
* Wed Nov 27 2013 Alec Leamas <[email protected]> - 0-12.1478565
- Upstream bugfixes.
* Fri Nov 22 2013 Alec Leamas <[email protected]> - 0-11.c885df3
- Upstream: Automate adding of pkg-build group to user.
- Upstream: Handle packages built only on i386.
- Fix left behind cruft after uninstalling lpf-* packages.
* Sat Nov 16 2013 Alec Leamas <[email protected]> - 0-10.d18db6d
- Upstream bugfixes.
- Fix bug when installing pkg with eula.
- Fix bug in lpf install scriptlets.
* Sun Nov 10 2013 Alec Leamas <[email protected]> - 0-9.b40e846
- Upstream bugfixes.
* Sun Nov 10 2013 Alec Leamas <[email protected]> - 0-8.ff50a5b
- Adding missing Requires:
* Sat Oct 26 2013 Alec Leamas <[email protected]> - 0-6.ff50a5b
- Yet another bugfix.
* Sat Oct 26 2013 Alec Leamas <[email protected]> - 0-6.354c031
- Fixing silly version error.
* Sat Oct 26 2013 Alec Leamas <[email protected]> - 0-5.6d285c5
- Allow spec file to be named .spec.in
* Fri Oct 25 2013 Alec Leamas <[email protected]> - 0-4.3051236
- Updating examples
* Sun Jun 23 2013 Alec Leamas <[email protected]> - 0-3.fe3defcf9
- Removed examples, added lpf spec tamplate.
- Add manpage
* Thu Jun 13 2013 Alec Leamas <[email protected]> - 0-3.fe3defcf9
- Added BR: python2-devel
- Simplified Source0 (https://fedorahosted.org/fpc/ticket/284)
- Using 2775 instead of 775 perms (https://fedorahosted.org/fpc/ticket/286)
* Tue Jun 11 2013 Alec Leamas <[email protected]> - 0-1.c4bc5a2
- Upstream Makefile added, clean up installation
* Mon Jun 10 2013 Alec Leamas <[email protected]> - 0-1.d961366
- Initial release