2 # - make ruby bindings use -base lib?
5 %bcond_without python # build python bindings
6 %bcond_without ruby # build ruby bindings
10 Summary: Library for parsing RCS files
11 Summary(pl.UTF-8): Moduł do analizy plików RCS
14 Release: 0.%{snap}.%{rel}
17 Source0: http://ww2.fs.ei.tum.de/~corecode/hg/rcsparse/archive/tip.tar.bz2?/%{name}.tbz2
18 # Source0-md5: 360ad1d3e0410d30abea710ce758c396
20 URL: http://ww2.fs.ei.tum.de/~corecode/hg/rcsparse/
21 BuildRequires: libtool
23 BuildRequires: python-devel
24 BuildRequires: rpm-pythonprov
27 BuildRequires: rpm-rubyprov
28 BuildRequires: rpmbuild(macros) >= 1.665
29 BuildRequires: ruby >= 1:1.8
30 BuildRequires: ruby-devel
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Library for parsing RCS files.
38 Summary: Header files and develpment documentation for rcsparse
39 Group: Development/Libraries
40 Requires: %{name} = %{epoch}:%{version}-%{release}
43 Header files and develpment documentation for rcsparse.
45 %package -n python-rcsparse
46 Summary: rcsparse Python bindings
47 Group: Development/Languages/Python
48 Requires: %{name} = %{epoch}:%{version}-%{release}
51 %description -n python-rcsparse
52 rcsparse Python bindings.
54 %package -n ruby-rcsparse
55 Summary: rcsparse Ruby bindings
56 Group: Development/Languages
57 %{?ruby_mod_ver_requires_eq}
58 # does not link with base
59 #Requires: %{name} = %{epoch}:%{version}-%{release}
61 %description -n ruby-rcsparse
62 rcsparse Ruby bindings.
70 libtool --tag=CC --mode=compile %{__cc} %{rpmcppflags} %{rpmcflags} -fPIC -shared -c rcsparse.c
71 libtool --tag=CC --mode=link %{__cc} %{rpmldflags} %{rpmcflags} -shared -o librcsparse.la -rpath %{_libdir} rcsparse.lo
74 libtool --tag=CC --mode=compile %{__cc} %{rpmcppflags} %{rpmcflags} -I%{py_incdir} -shared -c py-rcsparse.c
75 libtool --tag=CC --mode=link %{__cc} %{rpmldflags} %{rpmcflags} -avoid-version -module -shared -o rcsparse.la -rpath %{py_sitedir} py-rcsparse.lo librcsparse.la
79 %{__ruby} extconf.rb \
83 CFLAGS="%{rpmcflags} -fPIC"
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{%{_libdir},%{py_sitedir},%{_includedir}/%{name}}
89 libtool --mode=install install -p -c librcsparse.la $RPM_BUILD_ROOT%{_libdir}
90 rm -f $RPM_BUILD_ROOT%{_libdir}/librcsparse.a
91 cp -p *.h $RPM_BUILD_ROOT%{_includedir}/%{name}
94 libtool --mode=install install -p -c rcsparse.la $RPM_BUILD_ROOT%{py_sitedir}
95 rm -f $RPM_BUILD_ROOT%{py_sitedir}/rcsparse.la
96 rm -f $RPM_BUILD_ROOT%{py_sitedir}/rcsparse.a
100 %{__make} -j1 install \
101 DESTDIR=$RPM_BUILD_ROOT
105 rm -rf $RPM_BUILD_ROOT
107 %post -p /sbin/ldconfig
108 %postun -p /sbin/ldconfig
111 %defattr(644,root,root,755)
113 %attr(755,root,root) %{_libdir}/librcsparse.so.*.*.*
114 %attr(755,root,root) %ghost %{_libdir}/librcsparse.so.0
117 %defattr(644,root,root,755)
118 %attr(755,root,root) %{_libdir}/librcsparse.so
119 %{_libdir}/librcsparse.la
120 %{_includedir}/%{name}
123 %files -n python-rcsparse
124 %defattr(644,root,root,755)
126 %attr(755,root,root) %{py_sitedir}/rcsparse.so
130 %files -n ruby-rcsparse
131 %defattr(644,root,root,755)
132 %attr(755,root,root) %{ruby_vendorarchdir}/rcsfile.so