packages: lua52/lua52.spec, lua52/lua52-link.patch (NEW)=?UTF-8?Q?=20?=- added link patch...

qboosh qboosh at pld-linux.org
Mon Jun 25 20:59:01 CEST 2012


Author: qboosh                       Date: Mon Jun 25 18:59:00 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added link patch (based on lua51 one)
- updated files etc.

---- Files affected:
packages/lua52:
   lua52.spec (1.2 -> 1.3) , lua52-link.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/lua52/lua52.spec
diff -u packages/lua52/lua52.spec:1.2 packages/lua52/lua52.spec:1.3
--- packages/lua52/lua52.spec:1.2	Mon Jan 30 20:04:54 2012
+++ packages/lua52/lua52.spec	Mon Jun 25 20:58:55 2012
@@ -6,12 +6,13 @@
 Summary:	A simple lightweight powerful embeddable programming language
 Summary(pl.UTF-8):	Prosty, lekki ale potężny, osadzalny język programowania
 Name:		lua52
-Version:	5.2.0
+Version:	5.2.1
 Release:	0.1
 License:	MIT
 Group:		Development/Languages
 Source0:	http://www.lua.org/ftp/lua-%{version}.tar.gz
-# Source0-md5:	f1ea831f397214bae8a265995ab1a93e
+# Source0-md5:	ae08f641b45d737d12d30291a5e5f6e3
+Patch0:		%{name}-link.patch
 URL:		http://www.lua.org/
 %{?with_luastatic:BuildRequires:       dietlibc-static}
 BuildRequires:	readline-devel
@@ -98,8 +99,10 @@
 
 %prep
 %setup -q -n lua-%{version}
-sed -r -i 's|(#define LUA_ROOT.*)%{_prefix}/local/|\1%{_prefix}/|g' src/luaconf.h
-sed -r -i 's|(#define LUA_CDIR.*)lib/|\1%{_lib}/|g' src/luaconf.h
+%patch0 -p1
+
+sed -i  -e '/#define LUA_ROOT/s,/usr/local/,%{_prefix}/,' \
+	-e '/#define LUA_CDIR/s,lib/lua/,%{_lib}/lua/,' src/luaconf.h
 
 %build
 %if %{with luastatic}
@@ -117,8 +120,6 @@
 	CC="%{__cc}" \
 	CFLAGS="%{rpmcflags} -Wall -fPIC -DPIC -D_GNU_SOURCE -DLUA_USE_LINUX"
 
-#rm -f test/{lua,luac}
-
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_libdir}/lua}
@@ -130,7 +131,7 @@
 	INSTALL_MAN=$RPM_BUILD_ROOT%{_mandir}/man1 \
 	INSTALL_CMOD=$RPM_BUILD_ROOT%{_libdir}/lua/5.2
 
-# change name from lua to lua51
+# change name from lua to lua52
 for i in $RPM_BUILD_ROOT%{_bindir}/* ; do mv ${i}{,52} ; done
 mv $RPM_BUILD_ROOT%{_mandir}/man1/lua{,52}.1
 mv $RPM_BUILD_ROOT%{_mandir}/man1/luac{,52}.1
@@ -169,15 +170,15 @@
 
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/lua51
-%attr(755,root,root) %{_bindir}/luac51
+%attr(755,root,root) %{_bindir}/lua52
+%attr(755,root,root) %{_bindir}/luac52
 %{_mandir}/man1/lua52.1*
 %{_mandir}/man1/luac52.1*
 
 %files libs
 %defattr(644,root,root,755)
-%doc COPYRIGHT HISTORY README
-%attr(755,root,root) %{_libdir}/liblua.so.*.*
+%doc README
+%attr(755,root,root) %{_libdir}/liblua.so.5.2
 %dir %{_libdir}/lua
 %{_libdir}/lua/5.2
 %dir %{_datadir}/lua
@@ -185,7 +186,7 @@
 
 %files devel
 %defattr(644,root,root,755)
-%doc doc/*.{html,css,gif} test
+%doc doc/*.{html,css,gif,png}
 %attr(755,root,root) %{_libdir}/liblua52.so
 %{_includedir}/lua52
 %{_pkgconfigdir}/lua52.pc
@@ -197,7 +198,8 @@
 %if %{with luastatic}
 %files luastatic
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/*.static
+%attr(755,root,root) %{_bindir}/lua52.static
+%attr(755,root,root) %{_bindir}/luac52.static
 %endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -206,6 +208,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2012/06/25 18:58:55  qboosh
+- added link patch (based on lua51 one)
+- updated files etc.
+
 Revision 1.2  2012/01/30 19:04:54  glen
 - -libs Group: Libraries
 

================================================================
Index: packages/lua52/lua52-link.patch
diff -u /dev/null packages/lua52/lua52-link.patch:1.1
--- /dev/null	Mon Jun 25 20:59:01 2012
+++ packages/lua52/lua52-link.patch	Mon Jun 25 20:58:55 2012
@@ -0,0 +1,38 @@
+--- lua-5.2.1/src/Makefile.orig	2012-03-09 17:32:16.000000000 +0100
++++ lua-5.2.1/src/Makefile	2012-06-25 20:20:17.372198014 +0200
+@@ -46,24 +46,32 @@
+ ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ ALL_A= $(LUA_A)
+ 
++V=5.2
++
+ # Targets start here.
+ default: $(PLAT)
+ 
+-all:	$(ALL_T)
++all:	so $(ALL_T)
++
++so:	liblua.so
+ 
+ o:	$(ALL_O)
+ 
+ a:	$(ALL_A)
+ 
++liblua.so: $(BASE_O)
++	$(CC) -o liblua.so.$V -shared $(BASE_O) -Wl,-soname=liblua.so.$V -lm -ldl
++	ln -sf liblua.so.$V liblua.so
++
+ $(LUA_A): $(BASE_O)
+ 	$(AR) $@ $(BASE_O)
+ 	$(RANLIB) $@
+ 
+ $(LUA_T): $(LUA_O) $(LUA_A)
+-	$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
++	$(CC) -o $@ $(LDFLAGS) $(LUA_O) -L. -llua $(LIBS)
+ 
+ $(LUAC_T): $(LUAC_O) $(LUA_A)
+-	$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
++	$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+ 
+ clean:
+ 	$(RM) $(ALL_T) $(ALL_O)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/lua52/lua52.spec?r1=1.2&r2=1.3



More information about the pld-cvs-commit mailing list