Fix packaing man page for mingw-pkgconfig

This commit is contained in:
Sandro Mani 2021-06-13 09:21:05 +02:00
parent 596cb8d010
commit 4a7f3f602c

View File

@ -144,13 +144,13 @@ cp %{SOURCE0} COPYING
%install
mkdir -p $RPM_BUILD_ROOT
mkdir -p %{buildroot}
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
install -m 755 %{SOURCE9} $RPM_BUILD_ROOT%{_libexecdir}/mingw-scripts
mkdir -p %{buildroot}%{_libexecdir}
install -m 755 %{SOURCE9} %{buildroot}%{_libexecdir}/mingw-scripts
mkdir -p $RPM_BUILD_ROOT%{_bindir}
pushd $RPM_BUILD_ROOT%{_bindir}
mkdir -p %{buildroot}%{_bindir}
pushd %{buildroot}%{_bindir}
for i in mingw32-configure mingw32-cmake mingw32-make mingw32-meson mingw32-pkg-config \
mingw64-configure mingw64-cmake mingw64-make mingw64-meson mingw64-pkg-config ; do
ln -s %{_libexecdir}/mingw-scripts $i
@ -161,47 +161,47 @@ for i in i686-w64-mingw32-pkg-config \
done
popd
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/profile.d/
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/profile.d/
mkdir -p $RPM_BUILD_ROOT%{macrosdir}
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{macrosdir}/macros.mingw
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{macrosdir}/macros.mingw32
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{macrosdir}/macros.mingw64
mkdir -p %{buildroot}%{macrosdir}
install -m 644 %{SOURCE1} %{buildroot}%{macrosdir}/macros.mingw
install -m 644 %{SOURCE2} %{buildroot}%{macrosdir}/macros.mingw32
install -m 644 %{SOURCE3} %{buildroot}%{macrosdir}/macros.mingw64
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint
install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint/
mkdir -p %{buildroot}%{_sysconfdir}/rpmlint
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/rpmlint/
# Create the folders required for gcc and binutils
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/lib
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/lib
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/bin
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/lib
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/bin
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/lib
# The MinGW system root which will contain Windows native binaries
# and Windows-specific header files, pkgconfig, etc.
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/etc
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/include
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/include/sys
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/lib
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/lib/cmake
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/sbin
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/bin
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/etc
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/include
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/include/sys
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/lib
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/lib/cmake
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/sbin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/etc
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/include
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/include
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib/cmake
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/sbin
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/bin
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/etc
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/include
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/include
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/lib/cmake
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/sbin
# We don't normally package manual pages and info files, except
# where those are not supplied by a Fedora native package. So we
@ -211,36 +211,36 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/sbin
# /usr/x86_64-pc-mingw32/sys-root/man and
# /usr/x86_64-pc-mingw32/sys-root/doc
# but those are both packaging bugs.
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/doc
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/info
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/man
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/man/man{1,2,3,4,5,6,7,8,l,n}
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/aclocal
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/themes
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/cmake
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/locale
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/pkgconfig
mkdir -p $RPM_BUILD_ROOT%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/xml
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/doc
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/info
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/man
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/man/man{1,2,3,4,5,6,7,8,l,n}
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/aclocal
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/themes
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/cmake
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/locale
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/pkgconfig
mkdir -p %{buildroot}%{_prefix}/i686-w64-mingw32/sys-root/mingw/share/xml
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/doc
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/info
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man/man{1,2,3,4,5,6,7,8,l,n}
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/aclocal
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/themes
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/cmake
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/locale
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig
mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/xml
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/doc
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/info
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/man/man{1,2,3,4,5,6,7,8,l,n}
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/aclocal
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/themes
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/cmake
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/locale
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig
mkdir -p %{buildroot}%{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/xml
# Own folders for all locales
# Snippet taken from the Fedora filesystem package
sed -n -f %{SOURCE102} /usr/share/xml/iso-codes/iso_639.xml > $RPM_BUILD_ROOT/iso_639.tab
sed -n -f %{SOURCE103} /usr/share/xml/iso-codes/iso_3166.xml > $RPM_BUILD_ROOT/iso_3166.tab
sed -n -f %{SOURCE102} /usr/share/xml/iso-codes/iso_639.xml > %{buildroot}/iso_639.tab
sed -n -f %{SOURCE103} /usr/share/xml/iso-codes/iso_3166.xml > %{buildroot}/iso_3166.tab
grep -v "^$" $RPM_BUILD_ROOT/iso_639.tab | grep -v "^#" | while read a b c d ; do
grep -v "^$" %{buildroot}/iso_639.tab | grep -v "^#" | while read a b c d ; do
[[ "$d" =~ "^Reserved" ]] && continue
[[ "$d" =~ "^No linguistic" ]] && continue
@ -263,48 +263,50 @@ cat %{SOURCE101} | grep -v "^#" | grep -v "^$" | while read loc ; do
# If the locality is not official, skip it
if [ -n "$locality" ]; then
grep -q "^$locality" $RPM_BUILD_ROOT/iso_3166.tab || continue
grep -q "^$locality" %{buildroot}/iso_3166.tab || continue
fi
# If the locale is not official and not special, skip it
if [ -z "$special" ]; then
egrep -q "[[:space:]]${locale%%_*}[[:space:]]" $RPM_BUILD_ROOT/iso_639.tab || continue
egrep -q "[[:space:]]${locale%%_*}[[:space:]]" %{buildroot}/iso_639.tab || continue
fi
echo "%lang(${locale}) %{_prefix}/i686-w64-mingw32/sys-root/mingw/share/locale/${loc}" >> filelist_mingw32
echo "%lang(${locale}) %{_prefix}/x86_64-w64-mingw32/sys-root/mingw/share/locale/${loc}" >> filelist_mingw64
done
rm -f $RPM_BUILD_ROOT/iso_639.tab
rm -f $RPM_BUILD_ROOT/iso_3166.tab
rm -f %{buildroot}/iso_639.tab
rm -f %{buildroot}/iso_3166.tab
cat filelist_mingw32 filelist_mingw64 | grep "locale" | while read a b ; do
mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES
done
# NB. NOT _libdir
mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm
install -m 0755 %{SOURCE6} $RPM_BUILD_ROOT%{_rpmconfigdir}
install -m 0755 %{SOURCE7} $RPM_BUILD_ROOT%{_rpmconfigdir}
install -m 0755 %{SOURCE8} $RPM_BUILD_ROOT%{_rpmconfigdir}
install -m 0755 %{SOURCE13} $RPM_BUILD_ROOT%{_rpmconfigdir}
mkdir -p %{buildroot}/usr/lib/rpm
install -m 0755 %{SOURCE6} %{buildroot}%{_rpmconfigdir}
install -m 0755 %{SOURCE7} %{buildroot}%{_rpmconfigdir}
install -m 0755 %{SOURCE8} %{buildroot}%{_rpmconfigdir}
install -m 0755 %{SOURCE13} %{buildroot}%{_rpmconfigdir}
mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm/fileattrs
install -m 0644 %{SOURCE14} $RPM_BUILD_ROOT%{_rpmconfigdir}/fileattrs/
install -m 0644 %{SOURCE15} $RPM_BUILD_ROOT%{_rpmconfigdir}/fileattrs/
mkdir -p %{buildroot}/usr/lib/rpm/fileattrs
install -m 0644 %{SOURCE14} %{buildroot}%{_rpmconfigdir}/fileattrs/
install -m 0644 %{SOURCE15} %{buildroot}%{_rpmconfigdir}/fileattrs/
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mingw
install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_datadir}/mingw/
install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/mingw/
install -m 0644 %{SOURCE18} $RPM_BUILD_ROOT%{_datadir}/mingw/
install -m 0644 %{SOURCE19} $RPM_BUILD_ROOT%{_datadir}/mingw/
mkdir -p %{buildroot}%{_datadir}/mingw
install -m 0644 %{SOURCE11} %{buildroot}%{_datadir}/mingw/
install -m 0644 %{SOURCE12} %{buildroot}%{_datadir}/mingw/
install -m 0644 %{SOURCE18} %{buildroot}%{_datadir}/mingw/
install -m 0644 %{SOURCE19} %{buildroot}%{_datadir}/mingw/
mkdir -p $RPM_BUILD_ROOT%{pkgconfig_personalitydir}
install -m 0644 %{SOURCE20} $RPM_BUILD_ROOT%{pkgconfig_personalitydir}/i686-w64-mingw32.personality
install -m 0644 %{SOURCE21} $RPM_BUILD_ROOT%{pkgconfig_personalitydir}/x86_64-w64-mingw32.personality
mkdir -p %{buildroot}%{pkgconfig_personalitydir}
install -m 0644 %{SOURCE20} %{buildroot}%{pkgconfig_personalitydir}/i686-w64-mingw32.personality
install -m 0644 %{SOURCE21} %{buildroot}%{pkgconfig_personalitydir}/x86_64-w64-mingw32.personality
# Link mingw-pkg-config man pages to pkgconf(1)
mkdir -p %{buildroot}%{_mandir}/man1/
echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/i686-w64-mingw32-pkg-config.1
echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/x86_64-w64-mingw32-pkg-config.1
%files base
%doc COPYING
%dir %{_sysconfdir}/rpmlint/
@ -329,6 +331,8 @@ echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/x86_64-w64-mingw32-pkg-c
%{_datadir}/mingw/toolchain-mingw32.cmake
%{_datadir}/mingw/toolchain-mingw32.meson
%{pkgconfig_personalitydir}/i686-w64-mingw32.personality
%{_mandir}/man1/i686-w64-mingw32-pkg-config.1*
%files -n mingw64-filesystem
%{macrosdir}/macros.mingw64
@ -345,6 +349,7 @@ echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/x86_64-w64-mingw32-pkg-c
%{_datadir}/mingw/toolchain-mingw64.cmake
%{_datadir}/mingw/toolchain-mingw64.meson
%{pkgconfig_personalitydir}/x86_64-w64-mingw32.personality
%{_mandir}/man1/x86_64-w64-mingw32-pkg-config.1*
%changelog