[packages/udftools] - added shared patch (restore shared libudffs + devel stuff) - added includes patch (missing <string
qboosh
qboosh at pld-linux.org
Thu Oct 27 20:28:02 CEST 2016
commit 59bad3b931e0903d0b382a2f050dd90279f8ff07
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Oct 27 20:30:20 2016 +0200
- added shared patch (restore shared libudffs + devel stuff)
- added includes patch (missing <string.h> includes)
- disable strict-aliasing
udftools-includes.patch | 30 +++++++++++++++++++++
udftools-shared.patch | 71 +++++++++++++++++++++++++++++++++++++++++++++++++
udftools.spec | 71 ++++++++++++++++++++++++++++++++++++++++---------
3 files changed, 160 insertions(+), 12 deletions(-)
---
diff --git a/udftools.spec b/udftools.spec
index 7286c97..597a5a7 100644
--- a/udftools.spec
+++ b/udftools.spec
@@ -1,36 +1,66 @@
-Summary: UDF writing tools for CDRW recorders
-Summary(pl.UTF-8): Narzędzia umożliwiające zapisywanie na płytach CDRW w formacie UDF
+#
+# Conditional build:
+%bcond_without static_libs # static library
+#
+Summary: Linux tools for UDF filesystems and DVD/CD-R(W) drives
+Summary(pl.UTF-8): Linuksowe narzędzia do systemów plików UDF oraz nagrywarek DVD/CD-R(W)
Name: udftools
Version: 1.2
Release: 1
-License: GPL
+License: GPL v2+
Group: Applications/System
Source0: https://github.com/pali/udftools/archive/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: f5cbb7dffbb33778a90c08e76693651e
+Patch0: %{name}-shared.patch
+Patch1: %{name}-includes.patch
URL: http://linux-udf.sourceforge.net/
BuildRequires: autoconf >= 2.53
BuildRequires: automake
BuildRequires: libtool
BuildRequires: readline-devel
-Obsoletes: udftools-devel
-Obsoletes: udftools-static
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sbindir /sbin
-%define specflags -Wall
+%define specflags -Wall -fno-strict-aliasing
%description
-This package allows to use CDRW disks like a normal floppy disks. The
-data can modified and deleted. Disks can be read in any UDF
+This package allows to use DVD/CDRW disks like a normal floppy disks.
+The data can modified and deleted. Disks can be read in any UDF
compatibile system.
%description -l pl.UTF-8
-Ten pakiet umożliwia nagrywanie na dyskach CDRW jak na normalnych
+Ten pakiet umożliwia nagrywanie na płytach DVD/CDRW jak na normalnych
dyskietkach. Dane można usuwać i modyfikować. Odczyt jest możliwy na
systemach obsługujących system plików UDF.
+%package devel
+Summary: Header files for libudffs library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libudffs
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for libudffs library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libudffs.
+
+%package static
+Summary: Static libudffs library
+Summary(pl.UTF-8): Statyczna biblioteka libudffs
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static libudffs library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libudffs.
+
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
%build
%{__libtoolize}
@@ -40,16 +70,20 @@ systemach obsługujących system plików UDF.
%{__automake}
%configure \
--enable-shared \
- --enable-static=%{?with_static_libs:yes}%{!?with_static_libs:no}
+ --enable-static%{!?with_static_libs:=no}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sbindir}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+# no external dependencies
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libudffs.la
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/udftools
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -58,14 +92,27 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog
+%doc AUTHORS NEWS README doc/{HOWTO.udf,UDF-Specifications}
%attr(755,root,root) %{_bindir}/cdrwtool
%attr(755,root,root) %{_sbindir}/mkudffs
%attr(755,root,root) %{_sbindir}/pktsetup
%attr(755,root,root) %{_sbindir}/wrudf
%attr(755,root,root) %{_sbindir}/mkfs.udf
+%attr(755,root,root) %{_libdir}/libudffs.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libudffs.so.1
%{_mandir}/man1/cdrwtool.1*
%{_mandir}/man1/wrudf.1*
%{_mandir}/man8/mkudffs.8*
%{_mandir}/man8/pktsetup.8*
%{_mandir}/man8/mkfs.udf.8*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libudffs.so
+%{_includedir}/udffs
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libudffs.a
+%endif
diff --git a/udftools-includes.patch b/udftools-includes.patch
new file mode 100644
index 0000000..ddd8a04
--- /dev/null
+++ b/udftools-includes.patch
@@ -0,0 +1,30 @@
+--- udftools-1.2/libudffs/unicode.c.orig 2016-06-29 19:13:05.000000000 +0200
++++ udftools-1.2/libudffs/unicode.c 2016-10-27 05:35:27.516758958 +0200
+@@ -25,6 +25,7 @@
+ * libudffs unicode handling functions
+ */
+
++#include <string.h>
+ #include "libudffs.h"
+ #include "config.h"
+
+--- udftools-1.2/mkudffs/file.c.orig 2016-06-29 19:13:05.000000000 +0200
++++ udftools-1.2/mkudffs/file.c 2016-10-27 05:39:23.523422929 +0200
+@@ -26,6 +26,7 @@
+ */
+
+ #include <malloc.h>
++#include <string.h>
+
+ #include "libudffs.h"
+ #include "file.h"
+--- udftools-1.2/cdrwtool/options.c.orig 2016-06-29 19:13:05.000000000 +0200
++++ udftools-1.2/cdrwtool/options.c 2016-10-27 05:45:20.480085516 +0200
+@@ -22,6 +22,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <malloc.h>
+
+ #include "cdrwtool.h"
diff --git a/udftools-shared.patch b/udftools-shared.patch
new file mode 100644
index 0000000..65bc069
--- /dev/null
+++ b/udftools-shared.patch
@@ -0,0 +1,71 @@
+--- udftools-1.2/libudffs/Makefile.am.orig 2016-06-29 19:13:05.000000000 +0200
++++ udftools-1.2/libudffs/Makefile.am 2016-10-26 21:15:22.510434891 +0200
+@@ -1,4 +1,4 @@
+-noinst_LTLIBRARIES = libudffs.la
++lib_LTLIBRARIES = libudffs.la
+ libudffs_la_SOURCES = crc.c extent.c unicode.c ../include/getopt.h ../include/libudffs.h ../include/ecma_167.h ../include/osta_udf.h ../include/defaults.h ../include/udf_endian.h ../include/bswap.h
+ libudffs_la_LIBADD = @LTLIBOBJS@
+ libudffs_la_LDFLAGS = -version-info 1:0:0
+--- udftools-1.2/include/Makefile.am.orig 1970-01-01 01:00:00.000000000 +0100
++++ udftools-1.2/include/Makefile.am 2016-10-26 21:47:12.357079752 +0200
+@@ -0,0 +1,4 @@
++noinst_HEADERS = bswap.h udf_endian.h
++EXTRA_DIST = config.in
++pkgincludedir = $(includedir)/udffs
++pkginclude_HEADERS = ecma_167.h libudffs.h osta_udf.h udf_lib.h
+--- udftools-1.2/include/libudffs.h.orig 2016-06-29 19:13:05.000000000 +0200
++++ udftools-1.2/include/libudffs.h 2016-10-26 21:46:08.653747148 +0200
+@@ -30,7 +30,6 @@
+
+ #include "ecma_167.h"
+ #include "osta_udf.h"
+-#include "udf_endian.h"
+
+ #define FLAG_FREED_BITMAP 0x00000001
+ #define FLAG_FREED_TABLE 0x00000002
+--- udftools-1.2/Makefile.am.orig 2016-06-29 19:13:05.000000000 +0200
++++ udftools-1.2/Makefile.am 2016-10-26 21:47:32.960412852 +0200
+@@ -1,2 +1,2 @@
+-SUBDIRS = libudffs mkudffs cdrwtool pktsetup udffsck wrudf doc
++SUBDIRS = libudffs mkudffs cdrwtool pktsetup udffsck wrudf doc include
+ dist_doc_DATA = AUTHORS COPYING NEWS README
+--- udftools-1.2/configure.ac.orig 2016-06-29 19:13:05.000000000 +0200
++++ udftools-1.2/configure.ac 2016-10-27 05:46:53.953417785 +0200
+@@ -24,6 +24,6 @@
+ AC_CHECK_FUNCS(gettimeofday mktime lseek64 llseek)
+ AC_SUBST(LTLIBOBJS)
+
+-AC_CONFIG_FILES(Makefile libudffs/Makefile mkudffs/Makefile cdrwtool/Makefile pktsetup/Makefile udffsck/Makefile wrudf/Makefile doc/Makefile)
++AC_CONFIG_FILES(Makefile libudffs/Makefile mkudffs/Makefile cdrwtool/Makefile pktsetup/Makefile udffsck/Makefile wrudf/Makefile doc/Makefile include/Makefile)
+
+ AC_OUTPUT
+--- udftools-1.2/cdrwtool/cdrwtool.h.orig 2016-06-29 19:13:05.000000000 +0200
++++ udftools-1.2/cdrwtool/cdrwtool.h 2016-10-27 05:44:36.150086026 +0200
+@@ -13,6 +13,7 @@
+ #include <inttypes.h>
+ #include <linux/cdrom.h>
+ #include "../include/libudffs.h"
++#include "../include/bswap.h"
+
+ /*
+ * define this to be the default cdrom device
+--- udftools-1.2/mkudffs/file.h.orig 2016-06-29 19:13:05.000000000 +0200
++++ udftools-1.2/mkudffs/file.h 2016-10-27 05:37:56.356757269 +0200
+@@ -25,6 +25,7 @@
+ #define __FILE_H
+
+ #include "libudffs.h"
++#include "bswap.h"
+
+ tag query_tag(struct udf_disc *, struct udf_extent *, struct udf_desc *, uint16_t);
+ extern tag udf_query_tag(struct udf_disc *, uint16_t, uint16_t, uint32_t, struct udf_data *, uint16_t);
+--- udftools-1.2/wrudf/wrudf.c.orig 2016-06-29 19:13:05.000000000 +0200
++++ udftools-1.2/wrudf/wrudf.c 2016-10-27 05:46:03.563418375 +0200
+@@ -10,6 +10,7 @@
+ #include <string.h>
+ #include <sys/resource.h>
+
++#include "config.h"
+ #include "wrudf.h"
+
+ char *devicename; /* "/dev/cdrom" or disk image filename */
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/udftools.git/commitdiff/59bad3b931e0903d0b382a2f050dd90279f8ff07
More information about the pld-cvs-commit
mailing list