--with-mailgroup: fix the locking of mail

This should fix rhbz#2040522.
This commit is contained in:
Fabrice Bauzac 2022-05-18 21:12:23 +02:00
parent 1a50b71d6a
commit 80541b941b

View File

@ -1,6 +1,6 @@
Name: liblockfile
Version: 1.17
Release: 1%{?dist}
Release: 2%{?dist}
Summary: This implements a number of functions found in -lmail on SysV systems
# regarding license please see file COPYRIGHT
@ -31,17 +31,28 @@ developing applications that use %{name}.
%prep
%setup -q -n %{name}-%{VERSION}
# remove -g root from install
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 --with-mailgroup
%make_build
%install
export DESTDIR=%{buildroot}
%make_install
ldconfig -N -n %{buildroot}/%{_libdir}
@ -66,6 +77,9 @@ ldconfig -N -n %{buildroot}/%{_libdir}
%changelog
* Tue May 17 2022 Fabrice Bauzac-Stehly <noon@mykolab.com> - 1.17-2
- Enable --with-mailgroup (rhbz#2040522)
* Fri Jan 28 2022 Richard Lescak <rlescak@redhat.com> - 1.17-1
- Rebase to version 1.17