cleanup spec

(cherry picked from commit a01429dd070c1770cdaa854e51c2f28a6be35b58)
This commit is contained in:
Funda Wang 2024-09-09 15:40:32 +08:00 committed by openeuler-sync-bot
parent 1f4873c31f
commit 4cd5d58d03
2 changed files with 28 additions and 16 deletions

View File

@ -1,12 +1,13 @@
Name: liblockfile
Version: 1.14
Release: 4
Release: 5
Summary: Library providing functions to lock standard mailboxes
License: GPLv2+ and LGPLv2+
License: GPL-2.0-or-later AND LGPL-2.0-or-later
URL: https://github.com/miquels/liblockfile
Source0: https://github.com/miquels/liblockfile/archive/v%{version}.tar.gz
BuildRequires: gcc
BuildRequires: gcc make
BuildRequires: ldconfig
%description
This library implements a number of functions found in -lmail on SysV
@ -20,27 +21,36 @@ Requires: liblockfile = %{version}-%{release}
The liblockfile-devel package contains libraries and header files for
liblockfile development.
%package help
Summary: Liblockfile help docs and manual pages
Requires: liblockfile = %{version}-%{release}
Buildarch: noarch
%description help
The liblockfile-help package contains help docs and manual pages for liblockfile.
%package_help
%prep
%autosetup -n liblockfile-%{version} -p1
sed -i "s/-g root//" Makefile.in
# There are occurrences of "install -g GROUP ...".
#
# Changing the group requires permissions that are normally not
# available while packaging.
#
# Let's remove "-g GROUP".
sed -Ei "/install/ s/-g [^ ]+//" Makefile.in
# Makefile.in mixes and messes with DESTDIR and prefix.
# See the following pull requests submitted upstream:
# https://github.com/miquels/liblockfile/pull/11
# https://github.com/miquels/liblockfile/pull/15
sed -i \
-e '/^prefix/s,\$(DESTDIR),,' \
-e 's,\(\$(\(lib\|include\|man\|nfslock\|bin\)dir)\),$(DESTDIR)\1,' \
-e '/-DLOCKPROG/s,\$(DESTDIR),,' Makefile.in
%build
%configure --enable-shared --prefix=%{buildroot} --bindir=%{buildroot}%{_bindir} --mandir=%{buildroot}%{_mandir} --libdir=%{buildroot}%{_libdir} --includedir=%{buildroot}%{_includedir}
%configure --enable-shared
%make_build
%install
%make_install
ldconfig -N -n %{buildroot}/%{_libdir}
/sbin/ldconfig -N -n %{buildroot}/%{_libdir}
%post
/sbin/ldconfig
@ -49,7 +59,7 @@ ldconfig -N -n %{buildroot}/%{_libdir}
/sbin/ldconfig
%files
%doc COPYRIGHT
%license COPYRIGHT
%{_bindir}/dotlockfile
%{_libdir}/{liblockfile.so.1.0,liblockfile.so.1}
@ -63,9 +73,11 @@ ldconfig -N -n %{buildroot}/%{_libdir}
%{_mandir}/man3/{lockfile_create.3*,maillock.3*}
%changelog
* Thu Sep 19 2024 Funda Wang <fundawang@yeah.net> - 1.14-5
- cleanup spec
* Tue Aug 20 2024 Bowen Wang<wangbowen@cqsoftware.com.cn> - 1.14-4
- Added 'Buildarch: noarch' to the help subpackage
* Tue Apr 14 2020 huanghaitao <huanghaitao@huawei.com> 1.14-3
- Package init

View File

@ -1,4 +1,4 @@
version_control: github
src_repo: miquels/liblockfile
tag_prefix: ^v
seperator: .
separator: .