--- /dev/null
+#
+# spec file for package libzip
+#
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
+
+%define sover 5
+Name: libzip
+Version: 1.10.1
+Release: 0
+Summary: C library for reading, creating, and modifying zip archives
+License: BSD-3-Clause
+Group: Development/Libraries/C and C++
+URL: https://libzip.org/
+Source0: https://libzip.org/download/libzip-%{version}.tar.gz
+Source1001: libzip.manifest
+
+BuildRequires: cmake
+BuildRequires: groff
+BuildRequires: pkgconfig
+BuildRequires: pkgconfig(openssl1.1)
+BuildRequires: unzip
+BuildRequires: pkgconfig(zlib)
+BuildRequires: pkgconfig(bzip2)
+Provides: libzip-util = %{version}
+Obsoletes: libzip-util < %{version}
+
+%description
+libzip is a C library for reading, creating, and modifying zip
+archives. Files can be added from data buffers, files, or compressed. This
+package contains a set of small utilities built using libzip
+ * zipmerge - merge source zip archives into the target one
+ * zipcmp - compares the zip archives and check if they contains same files
+
+%package devel
+Summary: C library for reading, creating, and modifying zip archives
+Group: Development/Libraries/C and C++
+Requires: glibc-devel
+Requires: libzip = %{version}
+
+%description devel
+libzip is a C library for reading, creating, and modifying zip
+archives. This package contains devel files.
+
+%package tools
+Summary: Utilities from the libzip project
+Group: Productivity/Archiving/Compression
+Obsoletes: libzip < %{version}
+Provides: libzip = %{version}
+
+%description tools
+This subpackage contains zipcmp and zipmerge, for comparison of two
+archives, and merging multiple archives together, respectively.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+%cmake -DDOCUMENTATION_FORMAT=man \
+ -DCMAKE_C_FLAGS="%{optflags} -fPIC" \
+ -DCMAKE_EXE_LINKER_FLAGS=" -pie"
+make %{?_smp_mflags}
+
+%install
+%make_install DESTDIR=%{buildroot}
+#cp zipconf.h %{buildroot}/%{_includedir}/zipconf.h
+rm -f %{buildroot}%{_libdir}/libzip.la
+
+%remove_docs
+
+# %check
+# path needs to be exported otherwise unit tests will fail
+# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir}
+# %__make test
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files tools
+%manifest %{name}.manifest
+%license LICENSE
+%{_bindir}/zipcmp
+%{_bindir}/zipmerge
+%{_bindir}/ziptool
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%{_libdir}/libzip.so.%{sover}*
+
+%files devel
+%manifest %{name}.manifest
+%license LICENSE
+%{_libdir}/%{name}.so
+%{_includedir}/zip.h
+%{_includedir}/zipconf.h
+%{_libdir}/pkgconfig/%{name}.pc
+%{_libdir}/cmake/%{name}/*.cmake
+%{_libdir}/cmake/%{name}/modules/*.cmake
+
+%changelog