@@ -136,11 +136,11 @@ cd build && make %{?_smp_mflags} check
136
136
%install
137
137
cd build && make DESTDIR=%{buildroot } install
138
138
find %{buildroot } -name ' *.a' -delete
139
- mkdir -p %{buildroot }/var/cache/tdnf
139
+ mkdir -p %{buildroot }%{ _prefix } /var/cache/tdnf
140
140
mkdir -p %{buildroot }/%{_libdir }/systemd/system/
141
141
ln -sf %{_bindir }/tdnf %{buildroot }%{_bindir }/tyum
142
142
ln -sf %{_bindir }/tdnf %{buildroot }%{_bindir }/yum
143
- mv %{buildroot }/usr/lib/ pkgconfig/tdnfcli.pc %{buildroot }/usr/lib /pkgconfig/tdnf-cli-libs.pc
143
+ mv %{buildroot }%{ _libdir }/ pkgconfig/tdnfcli.pc %{buildroot }%{ _libdir } /pkgconfig/tdnf-cli-libs.pc
144
144
mkdir -p %{buildroot }/%{_tdnfpluginsdir }/tdnfrepogpgcheck
145
145
mv %{buildroot }/%{_tdnfpluginsdir }/libtdnfrepogpgcheck.so %{buildroot }/%{_tdnfpluginsdir }/tdnfrepogpgcheck/libtdnfrepogpgcheck.so
146
146
mv %{buildroot }/lib/systemd/system/ %{buildroot }/%{_libdir }/systemd/
@@ -150,43 +150,43 @@ python3 setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
150
150
popd
151
151
find %{buildroot } -name '*.pyc' -delete
152
152
153
- # Pre-install
154
- %pre
153
+ # # Pre-install
154
+ # %pre
155
155
156
- # First argument is 1 => New Installation
157
- # First argument is 2 => Upgrade
156
+ # # First argument is 1 => New Installation
157
+ # # First argument is 2 => Upgrade
158
158
159
- # Post-install
160
- %post
159
+ # # Post-install
160
+ # %post
161
161
162
- # First argument is 1 => New Installation
163
- # First argument is 2 => Upgrade
162
+ # # First argument is 1 => New Installation
163
+ # # First argument is 2 => Upgrade
164
164
165
- /sbin/ldconfig
165
+ # /sbin/ldconfig
166
166
167
- %triggerin -- motd
168
- [ $2 -eq 1 ] || exit 0
169
- if [ $1 -eq 1 ]; then
170
- echo "detected install of tdnf/motd, enabling tdnf-cache-updateinfo.timer" > &2
171
- systemctl enable tdnf-cache-updateinfo.timer > /dev/null 2> &1 || :
172
- systemctl start tdnf-cache-updateinfo.timer > /dev/null 2> &1 || :
173
- elif [ $1 -eq 2 ]; then
174
- echo "detected upgrade of tdnf, daemon-reload" > &2
175
- systemctl daemon-reload > /dev/null 2> &1 || :
176
- fi
167
+ # %triggerin -- motd
168
+ # [ $2 -eq 1 ] || exit 0
169
+ # if [ $1 -eq 1 ]; then
170
+ # echo "detected install of tdnf/motd, enabling tdnf-cache-updateinfo.timer" >&2
171
+ # systemctl enable tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
172
+ # systemctl start tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
173
+ # elif [ $1 -eq 2 ]; then
174
+ # echo "detected upgrade of tdnf, daemon-reload" >&2
175
+ # systemctl daemon-reload >/dev/null 2>&1 || :
176
+ # fi
177
177
178
- # Pre-uninstall
179
- %preun
178
+ # # Pre-uninstall
179
+ # %preun
180
180
181
- # First argument is 0 => Uninstall
182
- # First argument is 1 => Upgrade
181
+ # # First argument is 0 => Uninstall
182
+ # # First argument is 1 => Upgrade
183
183
184
- %triggerun -- motd
185
- [ $1 -eq 1 ] && [ $2 -eq 1 ] && exit 0
186
- echo "detected uninstall of tdnf/motd, disabling tdnf-cache-updateinfo.timer" > &2
187
- systemctl --no-reload disable tdnf-cache-updateinfo.timer > /dev/null 2> &1 || :
188
- systemctl stop tdnf-cache-updateinfo.timer > /dev/null 2> &1 || :
189
- rm -rf /var/cache/tdnf/cached-updateinfo.txt
184
+ # %triggerun -- motd
185
+ # [ $1 -eq 1 ] && [ $2 -eq 1 ] && exit 0
186
+ # echo "detected uninstall of tdnf/motd, disabling tdnf-cache-updateinfo.timer" >&2
187
+ # systemctl --no-reload disable tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
188
+ # systemctl stop tdnf-cache-updateinfo.timer >/dev/null 2>&1 || :
189
+ # rm -rf /var/cache/tdnf/cached-updateinfo.txt
190
190
191
191
# Post-uninstall
192
192
# %postun
@@ -241,7 +241,7 @@ rm -rf /var/cache/tdnf/cached-updateinfo.txt
241
241
%config %{_libdir }/systemd/system/tdnf-cache-updateinfo.service
242
242
%config (noreplace) %{_libdir }/systemd/system/tdnf-cache-updateinfo.timer
243
243
%config %{_sysconfdir }/motdgen.d/02-tdnf-updateinfo.sh
244
- %dir /var/cache/tdnf
244
+ %dir %{ _prefix } /var/cache/tdnf
245
245
%{_datadir }/bash-completion/completions/tdnf
246
246
247
247
%files devel
0 commit comments