Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release-src > by-pkgid > c5d5f5a6b7e251a1409fa6ef27e29e63 > files > 26

cgit-1.2.1-4.mga7.src.rpm

%global gitver      2.21.0
%global cachedir    %{_localstatedir}/cache/%{name}
%global filterdir   %{_libexecdir}/%{name}/filters
%global scriptdir   %{_localstatedir}/www/cgi-bin
%global cgitdata    %{_datadir}/%{name}

%global cgitmake \
%make V=1 \\\
     DESTDIR=%{buildroot} \\\
     CACHE_ROOT=%{cachedir} \\\
     CGIT_SCRIPT_PATH=%{scriptdir} \\\
     CGIT_SCRIPT_NAME=cgit \\\
     CGIT_DATA_PATH=%{cgitdata} \\\
     docdir=%{docdir} \\\
     mandir=%{_mandir} \\\
     filterdir=%{filterdir}

Name:           cgit
Version:        1.2.1
Release:        %mkrel 4
Summary:        A fast web interface for git
Group:          System/Servers
License:        GPLv2
URL:            https://git.zx2c4.com/cgit/
Source0:        https://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz
Source1:        https://mirrors.edge.kernel.org/pub/software/scm/git/git-%{gitver}.tar.xz
Source2:        cgitrc
Source3:        cgit.httpd
# upstream fixes
Patch001:	0001-filters-generate-anchor-links-from-markdown.patch
Patch002:	0002-parsing-ban-strncpy.patch
Patch003:	0003-parsing-ban-sprintf.patch
Patch004:	0004-ui-log-ban-strcpy.patch
Patch005:	0005-ui-log-ban-strncpy.patch
Patch006:	0006-ui-patch-ban-sprintf.patch
Patch007:	0007-ui-shared-ban-strcat.patch
Patch008:	0008-ui-ssdiff-ban-strncpy.patch
Patch009:	0009-ui-ssdiff-ban-strcat.patch
Patch010:	0010-git-update-to-v2.19.1.patch
Patch011:	0011-git-use-xz-compressed-archive-for-download.patch
Patch012:	0012-auth-filter-pass-url-with-query-string-attached.patch
Patch013:	0013-ui-blame-set-repo-for-sb.patch
Patch014:	0014-git-update-to-v2.20.0.patch
Patch015:	0015-ui-shared-fix-broken-sizeof-in-title-setting-and-rew.patch
Patch016:	0016-filters-migrate-from-luacrypto-to-luaossl.patch
Patch017:	0017-ui-ssdiff-resolve-HTML5-validation-errors.patch
Patch018:	0018-ui-diff-ui-tag-don-t-use-htmlf-with-non-formatted-st.patch
Patch019:	0019-ui-ssdiff-ban-strncat.patch
Patch020:	0020-git-update-to-v2.21.0.patch
Patch021:	0021-ui-shared-restrict-to-15-levels.patch

# highlight change
Patch500:	0500-cgit-0.9.1-highlightv3.patch
# (cg) Formatting patch from http://colin.guthr.ie/git/misc/cgit/log/?h=tweaks
Patch501:	0501-ui-repolist-Add-a-very-simple-pretty-print-option-fo.patch

BuildRequires:  asciidoc
BuildRequires:  docbook-style-xsl
BuildRequires:  xsltproc
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(openssl)
Requires:       webserver
Requires:       highlight

%description
Cgit is a fast web interface for git.  It uses caching to increase performance.

%prep
%setup -q -a 1
%autopatch -p1

# setup the git dir
rm -rf git
mv git-%{gitver} git
sed -i 's/^\(CFLAGS = \).*/\1%{optflags}/' git/Makefile
sed -i "s/GIT_VER = 2.7.0/GIT_VER = %{gitver}/" Makefile


%build
%cgitmake
# Something in the a2x chain doesn't like running in parallel. :/
%cgitmake -j 1 doc-man doc-html


%install
%cgitmake install install-man

install -d -m0755 %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d
install -p -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/cgitrc
install -p -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf
install -d -m0755 %{buildroot}%{cachedir}


%files
%doc COPYING README* *.html
%config(noreplace) %{_sysconfdir}/cgitrc
%config(noreplace) %{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf
%dir %attr(-,apache,root) %{cachedir}
%{cgitdata}
%{filterdir}
%{scriptdir}/*
%{_mandir}/man*/*


%changelog
* Mon May 20 2019 tmb <tmb> 1.2.1-4.mga7
+ Revision: 1398721
- ui-shared: restrict to 15 levels (mga#24843)

* Sat Mar 16 2019 tmb <tmb> 1.2.1-3.mga7
+ Revision: 1378129
- add uppstream fixes to support git 2.21

* Sat Sep 22 2018 umeabot <umeabot> 1.2.1-2.mga7
+ Revision: 1296104
- Mageia 7 Mass Rebuild

* Sat Aug 25 2018 tmb <tmb> 1.2.1-1.mga7
+ Revision: 1254356
- rebase P500, P501
- update to 1.2.1

* Thu Aug 23 2018 tmb <tmb> 0.12-5.mga7
+ Revision: 1253612
- fix CVE-2018-14912 (mga#23398)

* Sat Sep 09 2017 cjw <cjw> 0.12-4.mga7
+ Revision: 1152172
- rebuild for openssl 1.1

* Fri Mar 18 2016 luigiwalser <luigiwalser> 0.12-3.mga6
+ Revision: 992886
- update git again to 2.7.4

* Wed Mar 16 2016 colin <colin> 0.12-2.mga6
+ Revision: 992008
- Build against git 2.7.3

* Fri Jan 22 2016 colin <colin> 0.12-1.mga6
+ Revision: 926558
- New version: 0.12 (git 2.7.0) mga#17495

* Mon Aug 17 2015 colin <colin> 0.11.2-1.mga6
+ Revision: 865319
- New version: 0.11.2 (using git 2.5.0)

* Wed Oct 15 2014 umeabot <umeabot> 0.10.2-4.mga5
+ Revision: 741968
- Second Mageia 5 Mass Rebuild

* Fri Sep 26 2014 tv <tv> 0.10.2-3.mga5
+ Revision: 725005
- rebuild for bogus file deps

* Tue Sep 16 2014 umeabot <umeabot> 0.10.2-2.mga5
+ Revision: 678356
- Mageia 5 Mass Rebuild

* Sat Aug 30 2014 colin <colin> 0.10.2-1.mga5
+ Revision: 669565
- New version: 0.10.2

* Sun Apr 06 2014 colin <colin> 0.10.1-1.mga5
+ Revision: 612474
- Update to 0.10.1

* Sat Oct 19 2013 umeabot <umeabot> 0.9.2-3.mga4
+ Revision: 527563
- Mageia 4 Mass Rebuild

* Sun Jun 09 2013 colin <colin> 0.9.2-2.mga4
+ Revision: 441242
- Fix syntax highlighting script name
- Apply patches maually to avoid back files being included in package

* Sun Jun 09 2013 colin <colin> 0.9.2-1.mga4
+ Revision: 441157
- Add missing BR
- Fix group
- Add formatting patch
- Add some buildrequires and switch to pkgconfig BR where possible.
- Import Fedora package (with tweaks for Mageia)