]> git.pld-linux.org Git - packages/libzbc.git/commitdiff
- new
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 30 May 2020 19:10:32 +0000 (21:10 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 30 May 2020 19:10:32 +0000 (21:10 +0200)
libzbc-format.patch [new file with mode: 0644]
libzbc.spec [new file with mode: 0644]

diff --git a/libzbc-format.patch b/libzbc-format.patch
new file mode 100644 (file)
index 0000000..8d63484
--- /dev/null
@@ -0,0 +1,11 @@
+--- libzbc-5.8.5/tools/gzbc/gzbc_if_dev.c.orig 2020-03-09 06:44:41.000000000 +0100
++++ libzbc-5.8.5/tools/gzbc/gzbc_if_dev.c      2020-05-30 20:16:54.056454623 +0200
+@@ -1441,7 +1441,7 @@
+                                               GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                                               GTK_MESSAGE_ERROR,
+                                               GTK_BUTTONS_OK,
+-                                              str);
++                                              "%s", str);
+               gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
+                                                        "Error %d (%s)",
+                                                        ret, strerror(ret));
diff --git a/libzbc.spec b/libzbc.spec
new file mode 100644 (file)
index 0000000..4cce124
--- /dev/null
@@ -0,0 +1,153 @@
+#
+# Conditional build:
+%bcond_without apidocs         # do not build and package API docs
+%bcond_without gtk             # GTK+ 3 based GUI
+%bcond_without static_libs     # don't build static libraries
+#
+Summary:       Library for accessing and managing ZBC/ZAC devices
+Summary(pl.UTF-8):     Biblioteka do dostępu i zarządzania urządzeniami ZBC/ZAC
+Name:          libzbc
+Version:       5.8.5
+Release:       1
+License:       BSD or LGPL v3+
+Group:         Libraries
+#Source0Download: https://github.com/hgst/libzbc/releases
+Source0:       https://github.com/hgst/libzbc/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: f2be03832fface56f94dc4bc625bb46c
+Patch0:                %{name}-format.patch
+URL:           https://github.com/hgst/libzbc
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake >= 1:1.11
+%{?with_apidocs:BuildRequires: doxygen}
+%{?with_gtk:BuildRequires:     gtk+3-devel >= 3.0}
+BuildRequires: libtool >= 2:2
+BuildRequires: pkgconfig
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libzbc is a simple library providing functions for manipulating SCSI
+and ATA devices supporting the Zoned Block Command (ZBC) and
+Zoned-device ATA command set (ZAC) specifications.
+
+%description -l pl.UTF-8
+libzbc to prosta biblioteka udostępniająca funkcje do operowania na
+urządzeniach SCSI i ATA obsługujących specyfikacje ZBC (Zoned Block
+Command - strefowych poleceń blokowych) i ZAC (Zoned-device ATA
+Command - poleceń ATA urządzeń strefowych).
+
+%package devel
+Summary:       Header files for libzbc library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki libzbc
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for libzbc library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libzbc.
+
+%package static
+Summary:       Static libzbc library
+Summary(pl.UTF-8):     Statyczna biblioteka libzbc
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static libzbc library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libzbc.
+
+%package apidocs
+Summary:       API documentation for libzbc library
+Summary(pl.UTF-8):     Dokumentacja API biblioteki libzbc
+Group:         Documentation
+%if "%{_rpmversion}" >= "4.6"
+BuildArch:     noarch
+%endif
+
+%description apidocs
+API documentation for libzbc library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki libzbc.
+
+%package gui
+Summary:       GUI tools for libzbc
+Summary(pl.UTF-8):     Narzędzia dla libzbc z graficznym interfejsem użytkownika
+Group:         X11/Applications
+Requires:      %{name} = %{version}-%{release}
+
+%description gui
+GUI tools for libzbc.
+
+%description gui -l pl.UTF-8
+Narzędzia dla libzbc z graficznym interfejsem użytkownika.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+       %{!?with_gtk:--disable-gui} \
+       --disable-silent-rules \
+       %{!?with_static_libs:--disable-static}
+%{__make}
+
+%if %{with apidocs}
+cd documentation
+doxygen libzbc.doxygen
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libzbc.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc COPYING.BSD README.md
+%attr(755,root,root) %{_bindir}/zbc_*
+%attr(755,root,root) %{_libdir}/libzbc-%{version}.so
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libzbc.so
+%{_includedir}/libzbc
+%{_pkgconfigdir}/libzbc.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libzbc.a
+%endif
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc documentation/html/{search,*.css,*.html,*.js,*.png}
+%endif
+
+%if %{with gtk}
+%files gui
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/gzbc
+%attr(755,root,root) %{_bindir}/gzviewer
+%endif
This page took 0.102016 seconds and 4 git commands to generate.