]> git.pld-linux.org Git - packages/pesign.git/blob - pesign.spec
- ensure libdir is created
[packages/pesign.git] / pesign.spec
1 Summary:        Signing tool for PE-COFF binaries
2 Summary(pl.UTF-8):      Narzędzie do podpisywania binariów PE-COFF
3 Name:           pesign
4 Version:        113
5 Release:        1
6 License:        GPL v3+
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}
29 Requires:       rc-scripts
30 Provides:       group(pesign)
31 Provides:       user(pesign)
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Signing tool for PE-COFF binaries, hopefully at least vaguely
36 compliant with the PE and Authenticode specifications.
37
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.
41
42 %package libs
43 Summary:        libdpe shared library
44 Summary(pl.UTF-8):      Biblioteka współdzielona libdpe
45 Group:          Libraries
46
47 %description libs
48 libdpe shared library.
49
50 %description libs -l pl.UTF-8
51 Biblioteka współdzielona libdpe.
52
53 %package devel
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}
58
59 %description devel
60 Header files for libdpe library.
61
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe biblioteki libdpe.
64
65 %package static
66 Summary:        Static libdpe library
67 Summary(pl.UTF-8):      Statyczna biblioteka libdpe
68 Group:          Development/Libraries
69 Requires:       %{name}-devel = %{version}-%{release}
70
71 %description static
72 Static libdpe library.
73
74 %description static -l pl.UTF-8
75 Statyczna biblioteka libdpe.
76
77 %prep
78 %setup -q
79 %patch0 -p1
80 %patch1 -p1
81
82 %{__sed} -i -e 's,\$(libdatadir)systemd/system,%{systemdunitdir},' src/Makefile
83
84 %build
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
87 CC="gcc" \
88 CFLAGS="%{rpmcflags} -g" \
89 %{__make} \
90         LIBDIR=%{_libdir} \
91         libdir=%{_libdir} \
92         libexecdir=%{_libexecdir}
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96
97 %{__make} install install_systemd install_sysvinit \
98         DESTDIR=$RPM_BUILD_ROOT \
99         libdir=%{_libdir} \
100         libexecdir=%{_libexecdir}
101
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
108
109 # just unwanted COPYING file; make space for %doc
110 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/COPYING
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %pre
116 %groupadd -g 312 pesign
117 %useradd -u 312 -d /usr/share/empty -g pesign -c "pesign signing daemon user" pesign
118
119 %post
120 /sbin/chkconfig --add pesign
121 %service pesign restart
122
123 %preun
124 if [ "$1" = "0" ]; then
125         %service -q pesign stop
126         /sbin/chkconfig --del pesign
127 fi
128
129 %postun
130 if [ "$1" = "0" ]; then
131         %userremove pesign
132         %groupremove pesign
133 fi
134
135 %post   libs -p /sbin/ldconfig
136 %postun libs -p /sbin/ldconfig
137
138 %files
139 %defattr(644,root,root,755)
140 %doc README TODO
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???
154 %dir /etc/popt.d
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*
167
168 %files libs
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libdpe.so.0.%{version}
171
172 %files devel
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_libdir}/libdpe.so
175 %{_includedir}/libdpe
176
177 %files static
178 %defattr(644,root,root,755)
179 %{_libdir}/libdpe.a
This page took 0.12364 seconds and 4 git commands to generate.