- added lua support auto/th/cgit-0.10-2
authorŁukasz Kieś <kiesiu@pld-linux.org>
Tue, 25 Feb 2014 17:36:35 +0000 (18:36 +0100)
committerŁukasz Kieś <kiesiu@pld-linux.org>
Tue, 25 Feb 2014 17:36:35 +0000 (18:36 +0100)
- fixed file permissions; more verbose files
- removed C: for apache < 2.4
- rel. 2

cgit-lua.patch [new file with mode: 0644]
cgit.spec

diff --git a/cgit-lua.patch b/cgit-lua.patch
new file mode 100644 (file)
index 0000000..146a686
--- /dev/null
@@ -0,0 +1,46 @@
+diff -uNr cgit-0.10.old/cgit.mk cgit-0.10/cgit.mk
+--- cgit-0.10.old/cgit.mk      2014-01-17 16:09:16.000000000 +0100
++++ cgit-0.10/cgit.mk  2014-02-25 18:26:04.391520820 +0100
+@@ -29,30 +29,18 @@
+       LUA_MESSAGE := linking without specified Lua support
+       CGIT_CFLAGS += -DNO_LUA
+ else
+-LUAJIT_CFLAGS := $(shell pkg-config --cflags luajit 2>/dev/null)
+-LUAJIT_LIBS := $(shell pkg-config --libs luajit 2>/dev/null)
+-LUA_LIBS := $(shell pkg-config --libs lua 2>/dev/null)
+-LUA_CFLAGS := $(shell pkg-config --cflags lua 2>/dev/null)
+-ifeq (JIT,$(LUA_IMPLEMENTATION))
+-      ifeq ($(strip $(LUAJIT_LIBS)),)
+-              $(error LuaJIT specified via LUA_IMPLEMENTATION=JIT, but library could not be found.)
+-      endif
+-      LUA_MESSAGE := linking with selected LuaJIT
+-      CGIT_LIBS += $(LUAJIT_LIBS)
+-      CGIT_CFLAGS += $(LUAJIT_CFLAGS)
+-else ifeq (VANILLA,$(LUA_IMPLEMENTATION))
+-      ifeq ($(strip $(LUA_LIBS)),)
+-              $(error Lua specified via LUA_IMPLEMENTATION=VANILLA, but library could not be found.)
+-      endif
+-      LUA_MESSAGE := linking with selected Lua
+-      CGIT_LIBS += $(LUA_LIBS)
+-      CGIT_LIBS += $(LUA_CFLAGS)
+-else ifneq ($(strip $(LUAJIT_LIBS)),)
+-      LUA_MESSAGE := linking with autodetected LuaJIT
+-      CGIT_LIBS += $(LUAJIT_LIBS)
+-      CGIT_CFLAGS += $(LUAJIT_CFLAGS)
+-else ifneq ($(strip $(LUA_LIBS)),)
+-      LUA_MESSAGE := linking with autodetected Lua
++ifeq ($(LUA_PKGCONFIG),)
++      LUA_PKGCONFIG := $(shell for pc in lua5.2 lua51 lua50; do \
++                      pkg-config --exists $$pc 2>/dev/null && echo $$pc && break; \
++                      done)
++      LUA_MODE := autodetected
++else
++      LUA_MODE := specified
++endif
++ifneq ($(LUA_PKGCONFIG),)
++      LUA_MESSAGE := linking with $(LUA_MODE) $(LUA_PKGCONFIG)
++      LUA_LIBS := $(shell pkg-config --libs $(LUA_PKGCONFIG) 2>/dev/null)
++      LUA_CFLAGS := $(shell pkg-config --cflags $(LUA_PKGCONFIG) 2>/dev/null)
+       CGIT_LIBS += $(LUA_LIBS)
+       CGIT_CFLAGS += $(LUA_CFLAGS)
+ else
index e5099a0..75db72c 100644 (file)
--- a/cgit.spec
+++ b/cgit.spec
@@ -2,7 +2,7 @@ Summary:        cgit - a fast webinterface to git
 Summary(pl.UTF-8):     cgit - szybki interfejs WWW do gita
 Name:          cgit
 Version:       0.10
-Release:       1
+Release:       2
 License:       GPL v2
 Group:         Development/Tools
 Source0:       http://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz
@@ -11,12 +11,13 @@ Source1:    %{name}.conf
 Source2:       %{name}-repo.conf
 Source3:       %{name}-apache.conf
 Patch0:                %{name}-system-git.patch
+Patch1:                %{name}-lua.patch
 URL:           http://git.zx2c4.com/cgit/about/
 BuildRequires: git-core-devel >= 1.8.5
+BuildRequires: lua-devel >= 5.0
 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
@@ -43,6 +44,7 @@ HTML zapisany jest na dysku dla kolejnych żądań.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 cp  %{_includedir}/git-core/{Makefile,config.*} git
 
 %build
@@ -109,9 +111,16 @@ rm -rf $RPM_BUILD_ROOT
 %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(655,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(655,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
+%dir %{_prefix}/lib/cgit/filters/html-converters
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/man2html
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/md2html
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/rst2html
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/txt2html
+%dir %{_prefix}/lib/cgit/filters/html-converters/resources
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/html-converters/resources/markdown.pl
+%attr(655,root,root) %{_prefix}/lib/cgit/filters/html-converters/resources/rst-template.txt
This page took 0.072259 seconds and 4 git commands to generate.