1 Summary: Signing tool for PE-COFF binaries
2 Summary(pl.UTF-8): Narzędzie do podpisywania binariów PE-COFF
7 Group: Applications/System
8 #Source0Download: https://github.com/rhboot/pesign/releases
9 Source0: https://github.com/rhboot/pesign/releases/download/%{version}/%{name}-%{version}.tar.bz2
10 # Source0-md5: 4710e207b69c17537d3b3f18ce19948e
11 Patch0: %{name}-pld.patch
12 Patch1: %{name}-build.patch
13 URL: https://github.com/rhboot/pesign
14 BuildRequires: efivar-devel
15 BuildRequires: libuuid-devel
16 BuildRequires: nspr-devel
17 BuildRequires: nss-devel
18 BuildRequires: pkgconfig
19 BuildRequires: popt-devel
20 BuildRequires: rpmbuild(macros) >= 1.644
21 Requires(pre): /bin/id
22 Requires(pre): /usr/bin/getgid
23 Requires(pre): /usr/sbin/groupadd
24 Requires(pre): /usr/sbin/useradd
25 Requires(post,preun): /sbin/chkconfig
26 Requires(postun): /usr/sbin/groupdel
27 Requires(postun): /usr/sbin/userdel
28 Requires: %{name}-libs = %{version}-%{release}
30 Provides: group(pesign)
31 Provides: user(pesign)
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Signing tool for PE-COFF binaries, hopefully at least vaguely
36 compliant with the PE and Authenticode specifications.
38 %description -l pl.UTF-8
39 Narzędzie do podpisywania binariów PE-COFF, mające być przynajmniej
40 w jakiś sposób zgodne ze specyfikacjami PE oraz Authenticode.
43 Summary: libdpe shared library
44 Summary(pl.UTF-8): Biblioteka współdzielona libdpe
48 libdpe shared library.
50 %description libs -l pl.UTF-8
51 Biblioteka współdzielona libdpe.
54 Summary: Header files for libdpe library
55 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libdpe
56 Group: Development/Libraries
57 Requires: %{name}-libs = %{version}-%{release}
60 Header files for libdpe library.
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe biblioteki libdpe.
66 Summary: Static libdpe library
67 Summary(pl.UTF-8): Statyczna biblioteka libdpe
68 Group: Development/Libraries
69 Requires: %{name}-devel = %{version}-%{release}
72 Static libdpe library.
74 %description static -l pl.UTF-8
75 Statyczna biblioteka libdpe.
82 %{__sed} -i -e 's,\$(libdatadir)systemd/system,%{systemdunitdir},' src/Makefile
85 # due to checks (to distinguish gcc/clang) in Make.defaults gcc cannot be prefixed with target-
86 # -g is required because of -fvar-tracking
88 CFLAGS="%{rpmcflags} -g" \
92 libexecdir=%{_libexecdir}
95 rm -rf $RPM_BUILD_ROOT
97 %{__make} install install_systemd install_sysvinit \
98 DESTDIR=$RPM_BUILD_ROOT \
100 libexecdir=%{_libexecdir}
102 # omitted from install (as of 113)
103 install -D libdpe/libdpe.so $RPM_BUILD_ROOT%{_libdir}/libdpe.so.0.%{version}
104 ln -sf libdpe.so.0.%{version} $RPM_BUILD_ROOT%{_libdir}/libdpe.so
105 cp -p libdpe/libdpe.a $RPM_BUILD_ROOT%{_libdir}
106 install -d $RPM_BUILD_ROOT%{_includedir}/libdpe
107 cp -p include/libdpe/*.h $RPM_BUILD_ROOT%{_includedir}/libdpe
109 # just unwanted COPYING file; make space for %doc
110 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/COPYING
113 rm -rf $RPM_BUILD_ROOT
116 %groupadd -g 312 pesign
117 %useradd -u 312 -d /usr/share/empty -g pesign -c "pesign signing daemon user" pesign
120 /sbin/chkconfig --add pesign
121 %service pesign restart
124 if [ "$1" = "0" ]; then
125 %service -q pesign stop
126 /sbin/chkconfig --del pesign
130 if [ "$1" = "0" ]; then
135 %post libs -p /sbin/ldconfig
136 %postun libs -p /sbin/ldconfig
139 %defattr(644,root,root,755)
141 %attr(755,root,root) %{_bindir}/authvar
142 %attr(755,root,root) %{_bindir}/efikeygen
143 %attr(755,root,root) %{_bindir}/efisiglist
144 %attr(755,root,root) %{_bindir}/pesigcheck
145 %attr(755,root,root) %{_bindir}/pesign
146 %attr(755,root,root) %{_bindir}/pesign-client
147 %dir %{_libexecdir}/pesign
148 %attr(755,root,root) %{_libexecdir}/pesign/pesign-authorize
149 %dir %{_sysconfdir}/pesign
150 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pesign/groups
151 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pesign/users
152 %attr(775,pesign,pesign) %dir /etc/pki/pesign
153 # what should be proper owner???
155 /etc/popt.d/pesign.popt
156 /etc/rpm/macros.pesign
157 %attr(754,root,root) /etc/rc.d/init.d/pesign
158 %{systemdunitdir}/pesign.service
159 %attr(770,pesign,pesign) %dir /var/run/pesign
160 %{systemdtmpfilesdir}/pesign.conf
161 %{_mandir}/man1/authvar.1*
162 %{_mandir}/man1/efikeygen.1*
163 %{_mandir}/man1/efisiglist.1*
164 %{_mandir}/man1/pesigcheck.1*
165 %{_mandir}/man1/pesign.1*
166 %{_mandir}/man1/pesign-client.1*
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libdpe.so.0.%{version}
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_libdir}/libdpe.so
175 %{_includedir}/libdpe
178 %defattr(644,root,root,755)