From 1f94bec1a4f2f15057bcb61561be75468715ff02 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 19 Feb 2013 17:32:47 +0100 Subject: [PATCH] - new - shared patch adds shared library support --- vstream-client-shared.patch | 43 ++++++++++++++++ vstream-client.spec | 100 ++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 vstream-client-shared.patch create mode 100644 vstream-client.spec diff --git a/vstream-client-shared.patch b/vstream-client-shared.patch new file mode 100644 index 0000000..afacd8b --- /dev/null +++ b/vstream-client-shared.patch @@ -0,0 +1,43 @@ +--- vstream-client-1.2.1.1/Makefile.orig 2007-11-20 20:21:19.000000000 +0100 ++++ vstream-client-1.2.1.1/Makefile 2013-02-17 20:17:13.737712374 +0100 +@@ -1,31 +1,32 @@ + include config.mak + +-LIBNAME = libvstream-client.a ++LIBNAME = libvstream-client.la + + SRCS = mfs.c object.c schema.c query.c util.c io.c partition.c crc.c vstream.c + + INSTALL = install + +-OBJS = $(SRCS:.c=.o) ++OBJS = $(SRCS:.c=.lo) + INCLUDE = -I.. + LDFLAGS += $(SOCKLIB) + CFLAGS += $(INCLUDE) ++LIBTOOL = libtool + + all: $(LIBNAME) vstream-client + + install: $(LIBNAME) vstream-client +- $(INSTALL) -m 755 vstream-client $(BINDIR)/vstream-client +- $(INSTALL) -m 644 $(LIBNAME) $(LIBDIR)/$(LIBNAME) ++ $(LIBTOOL) --mode=install $(INSTALL) -m 755 vstream-client $(BINDIR)/vstream-client ++ $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME) $(LIBDIR)/$(LIBNAME) + $(INSTALL) -m 644 vstream-client.h $(INCDIR)/vstream-client.h + +-.c.o: +- $(CC) -c $(CFLAGS) -o $@ $< ++%.lo: %.c ++ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(CFLAGS) -o $@ $< + + $(LIBNAME): $(OBJS) +- $(AR) r $(LIBNAME) $(OBJS) ++ $(LIBTOOL) --mode=link --tag=CC $(CC) -o $(LIBNAME) $(OBJS) -rpath $(LIBDIR) + + vstream-client: $(LIBNAME) test-client.c +- $(CC) $(CFLAGS) test-client.c $(LIBNAME) -o vstream-client $(LDFLAGS) ++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(CFLAGS) test-client.c $(LIBNAME) -o vstream-client + + clean: + rm -f *.o *.a *~ vstream-client vstream-client.exe diff --git a/vstream-client.spec b/vstream-client.spec new file mode 100644 index 0000000..c450216 --- /dev/null +++ b/vstream-client.spec @@ -0,0 +1,100 @@ +Summary: A client library and example client for the Tivo vstream server +Summary(pl.UTF-8): Biblioteka kliencka i przykładowy klient serwera vstream Tivo +Name: vstream-client +Version: 1.2.1.1 +Release: 1 +License: GPL v2+ +Group: Libraries +#Source0Download: http://code.google.com/p/vstream-client/downloads/list +Source0: http://vstream-client.googlecode.com/files/%{name}-%{version}.tar.bz2 +# Source0-md5: 4f2fc3e5835592f5d8c230aaacd6a7b6 +Patch0: %{name}-shared.patch +URL: http://code.google.com/p/vstream-client/ +BuildRequires: libtool >= 2:1.5 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +# needs external vstream_error() function +%define skip_post_check_so libvstream-client.* + +%description +This is a fork off of the vstream library from the tivo-mplayer +project. It has been stripped down to just the client code, and +includes an example client application. + +%description -l pl.UTF-8 +Ta biblioteka to odgałęzienie biblioteki vstream z projektu +tivo-mplayer. Została okrojona do wyłącznie klienckiego kodu, +ponadto zawiera przykładową aplikację kliencką. + +%package devel +Summary: Header files for vstream-client library +Summary(pl.UTF-8): Pliki nagłówkowe biblioteki vstream-client +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Header files for vstream-client library. + +%description devel -l pl.UTF-8 +Pliki nagłówkowe biblioteki vstream-client. + +%package static +Summary: Static vstream-client library +Summary(pl.UTF-8): Statyczna biblioteka vstream-client +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +Static vstream-client library. + +%description static -l pl.UTF-8 +Statyczna biblioteka vstream-client. + +%prep +%setup -q +%patch0 -p1 + +%build +# NOTE: not autoconf configure +CFLAGS="%{rpmcflags}" \ +LDFLAGS="%{rpmldflags}" \ +./configure \ + --prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --libdir=%{_libdir} \ + --incdir=%{_includedir} + +%{__make} \ + CC="%{__cc}" + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}} + +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT \ + BINDIR=$RPM_BUILD_ROOT%{_bindir} \ + LIBDIR=$RPM_BUILD_ROOT%{_libdir} \ + INCDIR=$RPM_BUILD_ROOT%{_includedir} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/vstream-client +%attr(755,root,root) %{_libdir}/libvstream-client.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libvstream-client.so.0 + +%files devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libvstream-client.so +%{_libdir}/libvstream-client.la +%{_includedir}/vstream-client.h + +%files static +%defattr(644,root,root,755) +%{_libdir}/libvstream-client.a -- 2.44.0