summaryrefslogtreecommitdiffstats
path: root/cgit.spec
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2021-06-07 01:28:25 -0400
committerTodd Zullinger <tmz@pobox.com>2022-01-01 23:45:33 -0500
commit6b6d374a41f442484c4bd6a4156719d631c5b17d (patch)
tree4ff68139a427c61b8c17b0951258cc015e2775eb /cgit.spec
parent5337e3d93200e3235a7fddc90d1191187a224a39 (diff)
downloadcgit_EL6-6b6d374a41f442484c4bd6a4156719d631c5b17d.tar.gz
simplify install commands
Use `install -D` to create /etc/httpd/conf.d and install the cgit.conf in one command instead of two. Add %{httpdconfd} to keep this short. Replace `install -d` with `mkdir` for simple directory creation.
Diffstat (limited to 'cgit.spec')
-rw-r--r--cgit.spec11
1 files changed, 6 insertions, 5 deletions
diff --git a/cgit.spec b/cgit.spec
index 6be58c5..605008d 100644
--- a/cgit.spec
+++ b/cgit.spec
@@ -6,6 +6,7 @@
%global filterdir %{_libexecdir}/%{name}/filters
%global scriptdir %{_localstatedir}/www/cgi-bin
%global cgitdata %{_datadir}/%{name}
+%global httpdconfd %{_sysconfdir}/httpd/conf.d
# GPG signing key fingerprints
%global gpg_cgit AB9942E6D4A4CFC3412620A749FC7012A5DE03AE
@@ -183,10 +184,9 @@ highlight --print-style --style-outfile=stdout >> cgit.css
%install
%make_install install install-man
-install -d -m0755 %{buildroot}%{_sysconfdir}/httpd/conf.d
-install -p -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/cgitrc
-install -p -m0644 httpd.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/cgit.conf
-install -d -m0755 %{buildroot}%{cachedir}
+mkdir -p %{buildroot}%{cachedir}
+install -Dp -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/cgitrc
+install -Dp -m0644 httpd.conf %{buildroot}%{httpdconfd}/%{name}.conf
%check
@@ -202,7 +202,7 @@ make test
%dir %{_sysconfdir}/httpd
%dir %{_sysconfdir}/httpd/conf.d
%endif
-%config(noreplace) %{_sysconfdir}/httpd/conf.d/cgit.conf
+%config(noreplace) %{httpdconfd}/%{name}.conf
%dir %attr(-,apache,root) %{cachedir}
%{cgitdata}
%{filterdir}
@@ -215,6 +215,7 @@ make test
%changelog
* Mon Jul 26 2021 Todd Zullinger <tmz@pobox.com> - 1.2.3-7
- update SELinux README
+- simplify install commands
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild