X-Git-Url: http://git.pld-linux.org/?p=packages%2Fcgit.git;a=blobdiff_plain;f=cgit.spec;h=e5099a04dd996d1be3ee09d5b8f3ae542f08727f;hp=9d70050f83ae6a365b4d1f32feba6f6d257980c2;hb=08d38ec43baf2508f1e6a94d46c08792e9bea25e;hpb=2864b90a9044d33eb3a1861911eba9d1fa724648 diff --git a/cgit.spec b/cgit.spec index 9d70050..e5099a0 100644 --- a/cgit.spec +++ b/cgit.spec @@ -1,25 +1,22 @@ -# -# Conditional build -%bcond_with verbose # verbose build (V=1) -# Summary: cgit - a fast webinterface to git Summary(pl.UTF-8): cgit - szybki interfejs WWW do gita Name: cgit -Version: 0.8.2 -Release: 2 +Version: 0.10 +Release: 1 License: GPL v2 Group: Development/Tools -Source0: http://hjemli.net/git/cgit/snapshot/%{name}-%{version}.tar.bz2 -# Source0-md5: 872fafaa1ea6bd9292f312878864b665 +Source0: http://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz +# Source0-md5: 19944c17ecea1b1d1944718ce8ce6b61 Source1: %{name}.conf Source2: %{name}-repo.conf -Source3: %{name}-httpd.conf +Source3: %{name}-apache.conf Patch0: %{name}-system-git.patch -Patch1: %{name}-override-cflags.patch -URL: http://hjemli.net/git/cgit -BuildRequires: git-core-devel >= 1.6.1.1 +URL: http://git.zx2c4.com/cgit/about/ +BuildRequires: git-core-devel >= 1.8.5 BuildRequires: openssl-devel +BuildConflicts: zlib-devel = 1.2.5-1 Requires: webapps +Conflicts: apache-base < 2.4.0-1 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define webapp cgit @@ -27,6 +24,8 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define appdir %{_datadir}/%{webapp} %define cgibindir %{_prefix}/lib/cgi-bin +%define _noautoreqfiles %{_libdir}/cgit/filters + %description Cgit is a CGI application implemented in C: it's basically (yet) another git command, used to generate HTML. Cgit is not forking: all @@ -44,30 +43,31 @@ HTML zapisany jest na dysku dla kolejnych żądań. %prep %setup -q %patch0 -p1 -%patch1 -p1 +cp %{_includedir}/git-core/{Makefile,config.*} git %build %{__make} \ + V=1 \ CC="%{__cc}" \ CFLAGS="%{rpmcflags} -I/usr/include/git-core" \ LDFLAGS="%{rpmldflags}" \ LIBDIR=%{_libdir} \ CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \ - CGIT_SCRIPT_PATH="%{cgibindir}" \ - %{?with_verbose:V=1} + CGIT_SCRIPT_PATH="%{cgibindir}" %install rm -rf $RPM_BUILD_ROOT +# The same CFLAGS as in %build stage has to be passed to avoid +# "new build flags" logic in Makefile %{__make} install \ + V=1 \ DESTDIR=$RPM_BUILD_ROOT \ - CGIT_CONFIG="%{webappdir}/%{webapp.conf}" \ - CGIT_SCRIPT_PATH="%{cgibindir}" \ - %{?with_verbose:V=1} - -# css and logo -install -d $RPM_BUILD_ROOT%{_datadir}/%{name} -mv $RPM_BUILD_ROOT%{cgibindir}/%{name}.{css,png} $RPM_BUILD_ROOT%{appdir} + prefix=%{_prefix} \ + CFLAGS="%{rpmcflags} -I/usr/include/git-core" \ + CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \ + CGIT_DATA_PATH="%{appdir}" \ + CGIT_SCRIPT_PATH="%{cgibindir}" # cache install -d $RPM_BUILD_ROOT/var/cache/cgit @@ -88,10 +88,10 @@ rm -rf $RPM_BUILD_ROOT %triggerun -- apache1 < 1.3.37-3, apache1-base %webapp_unregister apache %{webapp} -%triggerin -- apache < 2.2.0, apache-base +%triggerin -- apache-base %webapp_register httpd %{webapp} -%triggerun -- apache < 2.2.0, apache-base +%triggerun -- apache-base %webapp_unregister httpd %{webapp} %files @@ -105,3 +105,13 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{cgibindir}/cgit.cgi %attr(770,root,http) /var/cache/cgit %{appdir} +%dir %{_prefix}/lib/cgit +%dir %{_prefix}/lib/cgit/filters +%attr(755,root,root) %{_prefix}/lib/cgit/filters/about-formatting.sh +%attr(755,root,root) %{_prefix}/lib/cgit/filters/commit-links.sh +%attr(755,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.lua +%attr(755,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.py +%attr(755,root,root) %{_prefix}/lib/cgit/filters/simple-authentication.lua +%attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.py +%attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.sh +%{_prefix}/lib/cgit/filters/html-converters