Package not found: openSUSE:Factory/kubernetes1.30

File qtlockedfile.spec of Package qtlockedfile

#
# spec file for package qtlockedfile
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#

%define sover   1
%define dotver  2.4
%define uver    2_4
Name:           qtlockedfile
Version:        2.4+git20180716
Release:        0
Summary:        QFile extension with advisory locking functions
### recheck licensing terms again before submitting, seems to me it's BSD-3-Clause
License:        GPL-3.0-only OR LGPL-2.0 WITH exceptions
# was http://doc.qt.digia.com/solutions/4/qtlockedfile/qtlockedfile.html
URL:            https://github.com/qtproject/qt-solutions
Source0:        %{name}-%{version}.tar.xz
# PATCH-FEATURE-OPENSUSE qtlockedfile-build_inst_lib.patch
Patch0:         qtlockedfile-build_inst_lib.patch
BuildRequires:  pkgconfig(Qt5Core)

%description
This class extends the QFile class with inter-process file locking capabilities.
If an application requires that several processes should access the same file,
QtLockedFile can be used to easily ensure that only one process at a time is
writing to the file, and that no process is writing to it while others are
reading it.

%package devel
Summary:        Development files for %{name}
Requires:       libQt5Solutions_LockedFile-%{uver}-%{sover} = %{version}
Requires:       pkgconfig(Qt5Core)

%description devel
This package contains libraries and header files for developing applications
that use QtLockedFile.

%package -n     libQt5Solutions_LockedFile-%{uver}-%{sover}
Summary:        QFile extension with advisory locking functions

%description -n libQt5Solutions_LockedFile-%{uver}-%{sover}
This class extends the QFile class with inter-process file locking capabilities.
If an application requires that several processes should access the same file,
QtLockedFile can be used to easily ensure that only one process at a time is
writing to the file, and that no process is writing to it while others are
reading it.

%prep
%autosetup -p1
# use versioned soname
sed -i 's/__LIBVER__/%{dotver}/' common.pri

%build
%qmake5
%make_build

%install
%qmake5_install
# create support file
mkdir -pv %{buildroot}%{_libqt5_archdatadir}/mkspecs/features
tee %{buildroot}%{_libqt5_archdatadir}/mkspecs/features/qtlockedfile.prf << "EOF"
INCLUDEPATH *= $$[QT_INSTALL_HEADERS]/QtSolutions
LIBS *= -lQt5Solutions_LockedFile-%{dotver}
EOF

%post -n libQt5Solutions_LockedFile-%{uver}-%{sover} -p /sbin/ldconfig
%postun -n libQt5Solutions_LockedFile-%{uver}-%{sover} -p /sbin/ldconfig

%files -n libQt5Solutions_LockedFile-%{uver}-%{sover}
%doc README.TXT
%{_libqt5_libdir}/libQt5Solutions_LockedFile-%{dotver}.so.%{sover}*

%files devel
%doc doc/html/ example/
%dir %{_libqt5_includedir}/QtSolutions/
%{_libqt5_includedir}/QtSolutions/QtLockedFile
%{_libqt5_includedir}/QtSolutions/qtlockedfile.h
%{_libqt5_libdir}/libQt5Solutions_LockedFile-%{dotver}.so
%{_libqt5_archdatadir}/mkspecs/features/qtlockedfile.prf

%changelog
openSUSE Build Service is sponsored by