packages: libnut/libnut-make.patch (NEW), libnut/libnut.spec (NEW) - new

qboosh qboosh at pld-linux.org
Sat Jul 2 12:30:13 CEST 2011


Author: qboosh                       Date: Sat Jul  2 10:30:13 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new

---- Files affected:
packages/libnut:
   libnut-make.patch (NONE -> 1.1)  (NEW), libnut.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/libnut/libnut-make.patch
diff -u /dev/null packages/libnut/libnut-make.patch:1.1
--- /dev/null	Sat Jul  2 12:30:13 2011
+++ packages/libnut/libnut-make.patch	Sat Jul  2 12:30:08 2011
@@ -0,0 +1,63 @@
+--- nut/Makefile.orig	2011-07-02 11:04:30.000000000 +0200
++++ nut/Makefile	2011-07-02 12:24:52.645610308 +0200
+@@ -14,44 +14,46 @@
+ 	$(RANLIB) $@
+ 
+ libnut/libnut.so: $(LIBNUT_OBJS)
+-	$(CC) $(CFLAGS) -shared $^ -o $@
++	$(CC) $(LDFLAGS) $(CFLAGS) -shared $^ -o $@.0 -Wl,-soname,libnut.so.0
++	ln -sf libnut.so.0 libnut/libnut.so
+ 
+ $(LIBNUT_OBJS): libnut/priv.h libnut/libnut.h
+ 
+ nututils: $(NUTUTILS_PROGS)
+ 
+ $(NUTMERGE_OBJS): nututils/nutmerge.h
+-nututils/nutmerge: $(NUTMERGE_OBJS) libnut/libnut.a
++nututils/nutmerge: $(NUTMERGE_OBJS) libnut/libnut.so
+ 
+ $(NUTUTILS_PROGS): CFLAGS += -Ilibnut
+ 
+ install: install-libnut install-nututils
+ 
+ install-libnut: libnut install-libnut-headers
+-	install -d $(prefix)/lib
+-	install -m 644 libnut/libnut.a $(prefix)/lib
++	install -d $(DESTDIR)$(LIBDIR)
++	install -m 644 libnut/libnut.a $(DESTDIR)$(LIBDIR)
+ 
+ install-libnut-shared: libnut/libnut.so install-libnut-headers
+-	install -d $(prefix)/lib
+-	install -m 644 libnut/libnut.so $(prefix)/lib
++	install -d $(DESTDIR)$(LIBDIR)
++	install -m 644 libnut/libnut.so.0 $(DESTDIR)$(LIBDIR)
++	ln -sf libnut.so.0 $(DESTDIR)$(LIBDIR)/libnut.so
+ 
+ install-libnut-headers:
+-	install -d $(prefix)/include
+-	install -m 644 libnut/libnut.h $(prefix)/include
++	install -d $(DESTDIR)$(PREFIX)/include
++	install -m 644 libnut/libnut.h $(DESTDIR)$(PREFIX)/include
+ 
+ install-nututils: nututils
+-	install -d $(prefix)/bin
+-	install -m 755 $(NUTUTILS_PROGS) $(prefix)/bin
++	install -d $(DESTDIR)$(PREFIX)/bin
++	install -m 755 $(NUTUTILS_PROGS) $(DESTDIR)$(PREFIX)/bin
+ 
+ uninstall: uninstall-libnut uninstall-nututils
+ 
+ uninstall-libnut:
+-	rm -f $(prefix)/lib/libnut.a
+-	rm -f $(prefix)/lib/libnut.so
+-	rm -f $(prefix)/include/libnut.h
++	rm -f $(DESTDIR)$(LIBDIR)/libnut.a
++	rm -f $(DESTDIR)$(LIBDIR)/libnut.so*
++	rm -f $(DESTDIR)$(PREFIX)/include/libnut.h
+ 
+ uninstall-nututils:
+-	rm -f $(addprefix $(prefix)/bin/, $(subst nututils/,,$(NUTUTILS_PROGS)))
++	rm -f $(addprefix $(DESTDIR)$(PREFIX)/bin/, $(subst nututils/,,$(NUTUTILS_PROGS)))
+ 
+ clean distclean:
+ 	rm -f libnut/*\~ libnut/*.o libnut/libnut.so libnut/libnut.a

================================================================
Index: packages/libnut/libnut.spec
diff -u /dev/null packages/libnut/libnut.spec:1.1
--- /dev/null	Sat Jul  2 12:30:13 2011
+++ packages/libnut/libnut.spec	Sat Jul  2 12:30:08 2011
@@ -0,0 +1,106 @@
+# $Revision$, $Date$
+Summary:	NUT multimedia container library
+Summary(pl.UTF-8):	Biblioteka obsługująca kontener multimedialny NUT
+# "nut" name is already occupied by Network UPS Tools
+Name:		libnut
+Version:	0
+%define	svnver	675
+Release:	0.%{svnver}.1
+License:	MIT
+Group:		Libraries
+# svn co svn://svn.mplayerhq.hu/nut/src/trunk nut
+Source0:	nut-r%{svnver}.tar.xz
+# Source0-md5:	be7a95aa5033fd8d9386902ee9dd83c1
+Patch0:		%{name}-make.patch
+# dead atm.
+#URL:		http://www.nut-container.org/
+URL:		http://www.ffmpeg.org/~michael/nut.txt
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+NUT multimedia container library.
+
+%description -l pl.UTF-8
+Biblioteka obsługująca kontener multimedialny NUT.
+
+%package devel
+Summary:	Header file for NUT library
+Summary(pl.UTF-8):	Plik nagłówkowy biblioteki NUT
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header file for NUT library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowy biblioteki NUT.
+
+%package static
+Summary:	Static NUT library
+Summary(pl.UTF-8):	Statyczna biblioteka NUT
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static NUT library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka NUT.
+
+%prep
+%setup -q -n nut
+%patch0 -p1
+
+%build
+cat > config.mak <<'EOF'
+PREFIX=%{_prefix}
+LIBDIR=%{_libdir}
+CFLAGS=%{rpmcflags} %{rpmcppflags} -Wall -fPIC
+CFLAGS+=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+LDFLAGS=%{rpmldflags}
+CC=%{__cc}
+RANLIB=ranlib
+AR=ar
+EOF
+
+%{__make} libnut/libnut.a libnut/libnut.so nututils
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install-libnut-shared install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc COPYING README
+%attr(755,root,root) %{_bindir}/nutmerge
+%attr(755,root,root) %{_bindir}/nutindex
+%attr(755,root,root) %{_bindir}/nutparse
+%attr(755,root,root) %{_libdir}/libnut.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libnut.so
+%{_includedir}/libnut.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libnut.a
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2011/07/02 10:30:08  qboosh
+- new
================================================================


More information about the pld-cvs-commit mailing list