Author: glen Date: Mon Feb 7 23:24:22 2011 GMT Module: packages Tag: HEAD ---- Log message: - up to 20090807 snap - add ruby package (builds with 1.8)
---- Files affected: packages/rcsparse: rcsparse.spec (1.7 -> 1.8) ---- Diffs: ================================================================ Index: packages/rcsparse/rcsparse.spec diff -u packages/rcsparse/rcsparse.spec:1.7 packages/rcsparse/rcsparse.spec:1.8 --- packages/rcsparse/rcsparse.spec:1.7 Wed Jan 19 01:55:46 2011 +++ packages/rcsparse/rcsparse.spec Tue Feb 8 00:24:15 2011 @@ -1,21 +1,32 @@ # $Revision$, $Date$ -# TODO: -# - ruby subpackage +# TODO +# - make ruby bindings use -base lib? # -%define snap 20090405 +# Conditional build: +%bcond_without python # build python bindings +%bcond_without ruby # build ruby bindings + +%define snap 20090807 +%define rel 1 Summary: Library for parsing RCS files Summary(pl.UTF-8): Moduł do analizy plików RCS Name: rcsparse Version: 0.1 -Release: 0.%{snap}.2 +Release: 0.%{snap}.1 License: BSD Group: Libraries -Source0: %{name}-%{snap}.tar.bz2 -# Source0-md5: e4c5b909a9d3f4acc2f18f6b8bf954f0 +Source0: http://ww2.fs.ei.tum.de/~corecode/hg/rcsparse/archive/tip.tar.bz2#/%{name}.tbz2 +# Source0-md5: 360ad1d3e0410d30abea710ce758c396 URL: http://ww2.fs.ei.tum.de/~corecode/hg/rcsparse/ BuildRequires: libtool +%if %{with python} BuildRequires: python-devel BuildRequires: rpm-pythonprov +%endif +%if %{with ruby} +BuildRequires: ruby >= 1:1.8.6 +BuildRequires: ruby-modules +%endif BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -38,24 +49,53 @@ %description -n python-rcsparse rcsparse Python bindings. +%package -n ruby-rcsparse +Summary: rcsparse Ruby bindings +Group: Development/Languages +%{?ruby_mod_ver_requires_eq} +# does not link with base +#Requires: %{name} = %{epoch}:%{version}-%{release} + +%description -n ruby-rcsparse +rcsparse Ruby bindings. + %prep -%setup -q -n %{name} +%setup -qc +mv %{name}-*/* . %build -libtool --tag=CC --mode=compile %{__cc} %{rpmcppflags} %{rpmcflags} -shared -c rcsparse.c +libtool --tag=CC --mode=compile %{__cc} %{rpmcppflags} %{rpmcflags} -fPIC -shared -c rcsparse.c libtool --tag=CC --mode=link %{__cc} %{rpmldflags} %{rpmcflags} -shared -o librcsparse.la -rpath %{_libdir} rcsparse.lo +%if %{with python} libtool --tag=CC --mode=compile %{__cc} %{rpmcppflags} %{rpmcflags} -I%{py_incdir} -shared -c py-rcsparse.c libtool --tag=CC --mode=link %{__cc} %{rpmldflags} %{rpmcflags} -avoid-version -module -shared -o rcsparse.la -rpath %{py_sitedir} py-rcsparse.lo librcsparse.la +%endif + +%if %{with ruby} +%{__ruby} extconf.rb +%{__make} -j1 \ + CC="%{__cc}" \ + CFLAGS="%{rpmcflags} -fPIC" +%endif %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_libdir},%{py_sitedir},%{_includedir}/%{name}} libtool --mode=install install -p -c librcsparse.la $RPM_BUILD_ROOT%{_libdir} -libtool --mode=install install -p -c rcsparse.la $RPM_BUILD_ROOT%{py_sitedir} - +rm -f $RPM_BUILD_ROOT%{_libdir}/librcsparse.a cp -p *.h $RPM_BUILD_ROOT%{_includedir}/%{name} + +%if %{with python} +libtool --mode=install install -p -c rcsparse.la $RPM_BUILD_ROOT%{py_sitedir} rm -f $RPM_BUILD_ROOT%{py_sitedir}/rcsparse.la +rm -f $RPM_BUILD_ROOT%{py_sitedir}/rcsparse.a +%endif + +%if %{with ruby} +%{__make} -j1 install \ + DESTDIR=$RPM_BUILD_ROOT +%endif %clean rm -rf $RPM_BUILD_ROOT @@ -65,6 +105,7 @@ %files %defattr(644,root,root,755) +%doc COPYRIGHT %attr(755,root,root) %{_libdir}/librcsparse.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/librcsparse.so.0 @@ -74,10 +115,18 @@ %{_libdir}/librcsparse.la %{_includedir}/%{name} +%if %{with python} %files -n python-rcsparse %defattr(644,root,root,755) %doc testmodule.py %attr(755,root,root) %{py_sitedir}/rcsparse.so +%endif + +%if %{with ruby} +%files -n ruby-rcsparse +%defattr(644,root,root,755) +%attr(755,root,root) %{ruby_sitearchdir}/rcsfile.so +%endif %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog @@ -85,6 +134,10 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.8 2011/02/07 23:24:15 glen +- up to 20090807 snap +- add ruby package (builds with 1.8) + Revision 1.7 2011/01/19 00:55:46 glen - pedantic hint taken from samchi, adding %{rpmcflags} to linker ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rcsparse/rcsparse.spec?r1=1.7&r2=1.8&f=u _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit