SPECS: lib3ds.spec - added bcond_without static_libs - run sed -i ...

witekfl witekfl at pld-linux.org
Sun Jul 22 10:43:46 CEST 2007


Author: witekfl                      Date: Sun Jul 22 08:43:46 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added bcond_without static_libs
- run sed -i (Package didn't build before.)

---- Files affected:
SPECS:
   lib3ds.spec (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: SPECS/lib3ds.spec
diff -u SPECS/lib3ds.spec:1.8 SPECS/lib3ds.spec:1.9
--- SPECS/lib3ds.spec:1.8	Tue Feb 13 07:46:50 2007
+++ SPECS/lib3ds.spec	Sun Jul 22 10:43:41 2007
@@ -1,4 +1,7 @@
 # $Revision$, $Date$
+# Conditional build:
+%bcond_without	static_libs	# don't build static library
+#
 Summary:	The 3D Studio File Format Library
 Summary(pl.UTF-8):	Biblioteka obsługująca format plików 3D Studio
 Name:		lib3ds
@@ -14,6 +17,7 @@
 BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	libtool
+BuildRequires:	sed >= 4.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -72,8 +76,8 @@
 %{__autoheader}
 %{__automake}
 #CPPFLAGS="-I/usr/X11R6/include" - but GL/glut is used only for noinst_PROGRAMS
-%configure
-
+%configure \
+	%{!?with_static_libs:--disable-static}
 %{__make}
 
 %install
@@ -84,8 +88,8 @@
 
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 install examples/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-sed -e 's/@GLUT_HEADER_DIR@/GL/' examples/glstub.h.in \
-	$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+sed -i -e 's/@GLUT_HEADER_DIR@/GL/' examples/glstub.h.in \
+	$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -110,9 +114,11 @@
 %{_mandir}/man1/lib3ds-config.1*
 %{_examplesdir}/%{name}-%{version}
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/lib3ds.a
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -120,6 +126,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.9  2007/07/22 08:43:41  witekfl
+- added bcond_without static_libs
+- run sed -i (Package didn't build before.)
+
 Revision 1.8  2007/02/13 06:46:50  glen
 - tabs in preamble
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/lib3ds.spec?r1=1.8&r2=1.9&f=u



More information about the pld-cvs-commit mailing list