]> git.pld-linux.org Git - packages/cgit.git/blame - cgit.spec
- updated to 0.8.3.4
[packages/cgit.git] / cgit.spec
CommitLineData
bf1ce868
AG
1#
2# Conditional build
3%bcond_with verbose # verbose build (V=1)
4#
5Summary: cgit - a fast webinterface to git
da36549f 6Summary(pl.UTF-8): cgit - szybki interfejs WWW do gita
bf1ce868 7Name: cgit
18ab1fdd 8Version: 0.8.3.4
740d29e2 9Release: 1
bf1ce868
AG
10License: GPL v2
11Group: Development/Tools
12Source0: http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2
18ab1fdd 13# Source0-md5: 712e4d3013d754aa5752e0101188cf32
bf1ce868
AG
14Source1: %{name}.conf
15Source2: %{name}-repo.conf
16Source3: %{name}-httpd.conf
ca7782e7
AG
17Patch0: %{name}-system-git.patch
18Patch1: %{name}-override-cflags.patch
bf1ce868 19URL: http://hjemli.net/git/cgit
18ab1fdd 20BuildRequires: git-core-devel >= 1.7.3
bf1ce868 21BuildRequires: openssl-devel
77429544 22BuildConflicts: zlib-devel = 1.2.5-1
bf1ce868
AG
23Requires: webapps
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%define webapp cgit
27%define webappdir %{_sysconfdir}/webapps/%{webapp}
28%define appdir %{_datadir}/%{webapp}
29%define cgibindir %{_prefix}/lib/cgi-bin
30
31%description
32Cgit is a CGI application implemented in C: it's basically (yet)
da36549f 33another git command, used to generate HTML. Cgit is not forking: all
bf1ce868 34git operations are performed by linking with libgit.a. It uses a
da36549f 35built-in cache: the generated HTML is stored on disk for the benefit
bf1ce868
AG
36of later requests.
37
38%description -l pl.UTF-8
da36549f
JB
39Cgit to napisana w C aplikacja CGI - zasadniczo jest to (kolejny)
40interfejs do gita, generujący kod HTML. Cgit jest aplikacją
bf1ce868
AG
41nieforkującą - wszystkie operacje na repozytoriach wykonywane są z
42użyciem biblioteki. Aplikacja ta korzysta z cache - wygenerowany kod
da36549f 43HTML zapisany jest na dysku dla kolejnych żądań.
bf1ce868
AG
44
45%prep
46%setup -q
47%patch0 -p1
48%patch1 -p1
49
50%build
51%{__make} \
52 CC="%{__cc}" \
53 CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
54 LDFLAGS="%{rpmldflags}" \
6815c324 55 LIBDIR=%{_libdir} \
bf1ce868
AG
56 CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
57 CGIT_SCRIPT_PATH="%{cgibindir}" \
58 %{?with_verbose:V=1}
59
60%install
61rm -rf $RPM_BUILD_ROOT
62
63%{__make} install \
64 DESTDIR=$RPM_BUILD_ROOT \
65 CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \
66 CGIT_SCRIPT_PATH="%{cgibindir}" \
67 %{?with_verbose:V=1}
68
69# css and logo
70install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
71mv $RPM_BUILD_ROOT%{cgibindir}/%{name}.{css,png} $RPM_BUILD_ROOT%{appdir}
72
73# cache
74install -d $RPM_BUILD_ROOT/var/cache/cgit
75
76# webapp stuff
77install -d $RPM_BUILD_ROOT%{webappdir}
78install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}
79install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}
80install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf
81install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
82
83%clean
84rm -rf $RPM_BUILD_ROOT
85
86%triggerin -- apache1 < 1.3.37-3, apache1-base
87%webapp_register apache %{webapp}
88
89%triggerun -- apache1 < 1.3.37-3, apache1-base
90%webapp_unregister apache %{webapp}
91
92%triggerin -- apache < 2.2.0, apache-base
93%webapp_register httpd %{webapp}
94
95%triggerun -- apache < 2.2.0, apache-base
96%webapp_unregister httpd %{webapp}
97
98%files
99%defattr(644,root,root,755)
100%doc README cgitrc.5.txt
101%dir %{webappdir}
102%config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit.conf
103%config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/cgit-repo.conf
104%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
105%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
106%attr(755,root,root) %{cgibindir}/cgit.cgi
107%attr(770,root,http) /var/cache/cgit
108%{appdir}
This page took 0.061006 seconds and 4 git commands to generate.