0e305f4
%global __python %{__python3}
f28c638
%global commit a7903da07d3d18c23314aa0815adbb4058fd7cec
06f1309
# %%global tag 11 #disabled due to unarragment release line after mass rebuild.
3b56a24
%global githead %(printf %%.7s %commit)
820b5fb
%global gitdate 20200107
cc3f5f7
dc5c64c
# epel7 compatibility mode
dc5c64c
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
dc5c64c
cc3f5f7
# Module Sample: (Alpha Version)
06f1309
# %% global moduleX %%name-of-module
cc3f5f7
#
06f1309
# %% package -n %%{moduleX}
06f1309
# Summary: %%{summary_of_moduleX}
06f1309
# License: %%{license_of_moduleX}
cc3f5f7
#
06f1309
# %% description -n %%{moduleX}
06f1309
# %%description-of-module
cc3f5f7
#
06f1309
# %% prep
06f1309
# ./gnulib-tool --create-testdir --dir=build-%%{moduleX} %%{moduleX}
cc3f5f7
#
06f1309
# %% build
06f1309
# pushd build-%%{moduleX}
06f1309
# %% configure --prefix=%%_prefix
06f1309
# make %%{?_smp_mflags}
cc3f5f7
# popd
cc3f5f7
#
06f1309
# %% install
06f1309
# pushd build-%%{moduleX}
06f1309
# %%make_install
cc3f5f7
# popd
06f1309
# help2man -N --no-discard-stderr %%{buildroot}%%{_bindir}/%%{moduleX} | gzip -9c > %%{buildroot}%%{_mandir}/man1/%%{moduleX}.1.gz
cc3f5f7
#
06f1309
# %% files -n %%{moduleX}
06f1309
# %%{_bindir}/%%{moduleX}
06f1309
# %%{_mandir}/*/%%{moduleX}.*
cc3f5f7
cc3f5f7
##################################
cc3f5f7
# LIST OF SINGLE MODULE PACKAGES :
cc3f5f7
# 1.git-merge-changelog
cc3f5f7
##################################
cc3f5f7
cc3f5f7
%global module1 git-merge-changelog
cc3f5f7
%global common_desc \
cc3f5f7
The GNU portability library is a macro system and C declarations and \
cc3f5f7
definitions for commonly-used API elements and abstracted system behaviors. \
cc3f5f7
It can be used to improve portability and other functionality in your programs.
cc3f5f7
06f1309
Name:     gnulib
06f1309
Version:  0
f28c638
Release:  31.%{gitdate}git%{?dist}
06f1309
Summary:  GNU Portability Library
06f1309
License:  Public Domain and BSD and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2 and LGPLv2+ and LGPLv3+
b6cf473
URL:      https://www.gnu.org/software/gnulib
b6cf473
Source0:  https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=%{githead};sf=tgz;name=gnulib-%{githead}.tar.gz#/gnulib-%{githead}.tar.gz
06f1309
Source1:  http://erislabs.net/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f=debian/manpages/check-module.1
06f1309
Source2:  http://erislabs.net/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f=debian/manpages/gnulib-tool.1
06f1309
c4b6621
Patch0:   test-u8-strstr-alarm.diff
0604c25
Patch1:   epel7-add-sup-macro-for-texinfo.patch
c4b6621
d6ffc50
BuildRequires:		perl-generators
cc3f5f7
BuildRequires:		texinfo
cc3f5f7
BuildRequires:		java-devel
cc3f5f7
cc3f5f7
# For building Modules, all gnulib requires must be found, Modules BRs:
cc3f5f7
BuildRequires:		gettext-devel
cc3f5f7
BuildRequires:		bison
cc3f5f7
BuildRequires:		gperf
cc3f5f7
BuildRequires:		libtool
cc3f5f7
BuildRequires:		help2man
06f1309
BuildRequires:		git
cc3f5f7
cc3f5f7
%description
cc3f5f7
%common_desc
cc3f5f7
cc3f5f7
%prep
06f1309
%autosetup -n %{name}-%{githead} -p1 -Sgit
7d96eed
7d96eed
#modules not to be tested by direct import
7d96eed
toRemove="lib-symbol-visibility havelib .*-obsolete localcharset gettext-h gettext alloca-opt alloca "
7d96eed
7d96eed
list="$(./gnulib-tool --list)"
7d96eed
for item in $toRemove
7d96eed
do
7d96eed
   list="$(echo $list| sed "s:\b$item\b::g")"
7d96eed
done
7d96eed
#is necessary to avoid some modules to test prep pass
7d96eed
./gnulib-tool --create-testdir --with-tests --with-obsolete --avoid=alloca --avoid=lib-symbol-visibility --avoid=havelib --dir=build-tests $list
7d96eed
cc3f5f7
rm lib/javaversion.class
cc3f5f7
# MODULE #1 - git-merge-changelog
cc3f5f7
./gnulib-tool --create-testdir --dir=build-%{module1} %{module1}
cc3f5f7
cc3f5f7
%build
cc3f5f7
# MODULE #1 - git-merge-changelog
cc3f5f7
pushd build-%{module1}
cc3f5f7
%configure --prefix=%_prefix
cc3f5f7
make %{?_smp_mflags}
cc3f5f7
popd
7d96eed
#tests build
f28c638
cp -p lib/timevar.def build-tests/gllib #Fix timevar.def not found
7d96eed
pushd build-tests
7d96eed
%configure --prefix=%_prefix
7d96eed
make %{?_smp_mflags}
7d96eed
popd
cc3f5f7
# Rebuild removed java class
cc3f5f7
javac -d lib -source 1.3 -target 1.3 lib/javaversion.java
cc3f5f7
# This part is done with the original path
cc3f5f7
make %{?_smp_mflags} MODULES.html
cc3f5f7
sed -i -r 's#HREF="(lib|m4|modules)#HREF="%{_datadir}/%{name}/\1#g' MODULES.html
cc3f5f7
sed -i "/^[ ]*gnulib_dir=/s#\`[^\`]*\`#%{_datadir}/%{name}#" gnulib-tool
cc3f5f7
# This part is done with the target path
cc3f5f7
make %{?_smp_mflags} info html
cc3f5f7
# Removing unused files
cc3f5f7
rm -f */.cvsignore
cc3f5f7
rm -f */.gitignore
cc3f5f7
rm -f */.gitattributes
cc3f5f7
rm -f lib/.cppi-disable
cc3f5f7
rm -f lib/uniname/gen-uninames.lisp
cc3f5f7
7d96eed
%check
afcca50
make -C build-tests check VERBOSE=1
7d96eed
cc3f5f7
%install
cc3f5f7
mkdir -p %{buildroot}%{_datadir}/%{name}
cc3f5f7
mkdir -p %{buildroot}%{_bindir}
cc3f5f7
mkdir -p %{buildroot}%{_datadir}/info
cc3f5f7
mkdir -p %{buildroot}%{_pkgdocdir}
cc3f5f7
mkdir -p %{buildroot}%{_mandir}/man1
cc3f5f7
cc3f5f7
cp -p check-module %{buildroot}%{_bindir}
cc3f5f7
cp -p gnulib-tool %{buildroot}%{_bindir}
cc3f5f7
cp -rp build-aux lib m4 modules config tests %{buildroot}%{_datadir}/%{name}/
cea2f6f
mkdir -p %{buildroot}%{_datadir}/%{name}/doc
cea2f6f
cp -arv doc/relocatable.texi %{buildroot}%{_datadir}/%{name}/doc
cc3f5f7
cc3f5f7
cp -p doc/gnulib.info %{buildroot}%{_datadir}/info/
cc3f5f7
cp -p doc/gnulib.html MODULES.html NEWS COPYING ChangeLog users.txt doc/COPYING* %{buildroot}%{_pkgdocdir}/
cc3f5f7
cp -p %{SOURCE1} %{SOURCE2} %{buildroot}%{_mandir}/man1
cc3f5f7
521d3be
cp -rp top %{buildroot}%{_datadir}/%{name}/
521d3be
cc3f5f7
# Module installing
afcca50
%make_install -C build-%{module1}
cc3f5f7
help2man -N --no-discard-stderr %{buildroot}%{_bindir}/%{module1} | gzip -9c > %{buildroot}%{_mandir}/man1/%{module1}.1.gz
cc3f5f7
cc3f5f7
#-------------------------------------------------------------------------
cc3f5f7
cc3f5f7
%package docs
cc3f5f7
Summary: Documentation for %{name} modules
cc3f5f7
License: GFDL
cc3f5f7
Requires:			%{name}-devel = %{version}-%{release}
cc3f5f7
BuildArch: noarch
cc3f5f7
cc3f5f7
%description docs
cc3f5f7
%common_desc
cc3f5f7
cc3f5f7
This package contains documentation for %{name}.
cc3f5f7
cc3f5f7
%files docs
cc3f5f7
%{_datadir}/info/gnulib.info.gz
cc3f5f7
%{_pkgdocdir}/gnulib.html
cc3f5f7
%{_pkgdocdir}/MODULES.html
cc3f5f7
# license text is included directly in info and html files.
cc3f5f7
cc3f5f7
#-------------------------------------------------------------------------
cc3f5f7
cc3f5f7
%package devel
cc3f5f7
Summary: Devel files of %{name}
cc3f5f7
BuildArch: noarch
cc3f5f7
Provides: gnulib
cc3f5f7
Requires: gettext-devel
cc3f5f7
Requires: bison
cc3f5f7
Requires: coreutils
cc3f5f7
Requires: gperf
cc3f5f7
Requires: libtool
cc3f5f7
Requires: make
cc3f5f7
Requires: texinfo
cc3f5f7
Requires: diffutils
cc3f5f7
Requires: patch
cc3f5f7
cc3f5f7
%description devel
cc3f5f7
%common_desc
cc3f5f7
cc3f5f7
This package contains devel files of %{name}.
cc3f5f7
cc3f5f7
%files devel
cc3f5f7
%{_datadir}/%{name}/
cc3f5f7
%{_bindir}/gnulib-tool
cc3f5f7
%{_bindir}/check-module
cc3f5f7
%{_mandir}/*/check-module.*
cc3f5f7
%{_mandir}/*/gnulib-tool.*
cc3f5f7
%{_pkgdocdir}/
cc3f5f7
%exclude %{_pkgdocdir}/MODULES.html
cc3f5f7
%exclude %{_pkgdocdir}/gnulib.html
cc3f5f7
cc3f5f7
#-------------------------------------------------------------------------
cc3f5f7
cc3f5f7
# MODULE #1 - git-merge-changelog
cc3f5f7
%package -n %{module1}
cc3f5f7
Summary: Git merge driver for ChangeLog files
cc3f5f7
License: GPLv2+
cc3f5f7
cc3f5f7
%description -n %{module1}
cc3f5f7
Git Merge Changelog is a git merge driver for changelogs that combines
cc3f5f7
parallel additions to the changelog without generating merge conflicts.
cc3f5f7
It can be enabled for specific files by setting appropriate git attributes.
cc3f5f7
cc3f5f7
%files -n %{module1}
cc3f5f7
%{_bindir}/%{module1}
cc3f5f7
%{_mandir}/*/%{module1}.*
394b587
%license doc/COPYINGv2
cc3f5f7
cc3f5f7
#-------------------------------------------------------------------------
cc3f5f7
%changelog
266c52d
* Tue Jan 07 2020 Mosaab Alzoubi <moceap[AT]hotmail[DOT]com> - 0-31.20200107git
820b5fb
- Update on 2020-01-07
f28c638
- CVE-2018-17942
0604c25
- Patch for building in EPEL7 (Add sup macro to Texinfo)
0e305f4
- Force python3 for building in EPEL7
f28c638
b4c6f1e
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-30.20180720git
b4c6f1e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b4c6f1e
d9b1adf
* Thu Mar  7 2019 Tim Landscheidt <tim@tim-landscheidt.de> - 0-29.20180720git%{?dist}
d9b1adf
- Remove obsolete requirements for post/preun scriptlets
d9b1adf
17b1455
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-28.20180720git
17b1455
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
17b1455
521d3be
* Sun Sep 16 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0-27.20180720git
521d3be
- Also include /usr/share/gnulib/top/GNUmakefile (#1607163)
521d3be
b6cf473
* Sun Jul 22 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0-26.20180720git
b6cf473
- Update on 20180720
b6cf473
6dc7f2b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-25.20170217git
6dc7f2b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
6dc7f2b
e00bc93
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-24.20170217git
e00bc93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e00bc93
18f6cec
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-23.20170217git
18f6cec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
18f6cec
cea2f6f
* Thu Jul 27 2017 Peter Lemenkov <lemenkov@gmail.com> - 0-22.20170217git
cea2f6f
- Install relocatable.texi file as well (required sometimes)
cea2f6f
95f1105
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-21.20170217git
95f1105
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
95f1105
d340f03
* Fri Feb 17 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0-20.20170217git
d340f03
- Update on 20170217.
d340f03
005a3ef
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-19.20161109git
005a3ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
005a3ef
02c5e02
* Sat Nov 12 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0-18.20161109git
02c5e02
- Update on 20161109.
02c5e02
9536644
* Wed May 11 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0-17.20160508git
9536644
- Update on 20160511.
9536644
02c41b4
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0-16.20150928git
02c41b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
02c41b4
06f1309
* Mon Sep 28 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0-15.20150928git
06f1309
- Update on 20150928.
06f1309
394b587
* Mon Jul  6 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0-15.20150706git
394b587
- Update on 20150706.
394b587
- Fixes #1239538.
394b587
a950683
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-15.20150325git
a950683
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a950683
fa91d09
* Wed Mar 25 2015 Mosaab Alzoubi <moceap@hotmail.com> - 0-14.20150325git
fa91d09
- Update on 20150325.
fa91d09
1b8c3d2
* Sun Dec 14 2014 Mosaab Alzoubi <moceap@hotmail.com> - 0-13.20141214git
1b8c3d2
- Update on 20141214.
1b8c3d2
f5bc601
* Tue Oct 21 2014 Mosaab Alzoubi <moceap@hotmail.com> - 0-12.20141021git
f5bc601
- Update on 20141021.
f5bc601
c44dacf
* Wed Sep 17 2014 Mosaab Alzoubi <moceap@hotmail.com> - 0-11.20140910git
c44dacf
- Disable varible tag number.
c44dacf
1f2746c
* Thu Sep 11 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0-9.20140910git
1f2746c
- Update to latest git.
1f2746c
1f2746c
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-10.20140710git
5cefe40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
5cefe40
4b9769f
* Thu Jul 10 2014 Mosaab Alzoubi <moceap@hotmail.com> - 0-9.20140710git
4b9769f
- Update on 20140710.
4b9769f
- Fix unneed numbers of release line after (FRE).
4b9769f
7d96eed
* Fri Jun 27 2014 Jakub Čajka <jcajka@redhat.com> - 0-8.20140504git.2
7d96eed
- Added tests
7d96eed
c2f0d77
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-8.20140504git.1
c2f0d77
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c2f0d77
6df6c8d
* Sun May 4 2014 Mosaab Alzoubi <moceap@hotmail.com> - 0-8.20140504git
6df6c8d
- Update on 20140504.
6df6c8d
3b56a24
* Mon Mar 03 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0-7.20140225git
3b56a24
- Update to latest git.
3b56a24
a017c46
* Mon Jan 27 2014 Mosaab Alzoubi <moceap@hotmail.com> - 0-6.20140127git
a017c46
- Update on 20140127.
a017c46
6e3165f
* Thu Jan 9 2014 Mosaab Alzoubi <moceap@hotmail.com> - 0-5.20140109git
6e3165f
- Update on 20140109.
6e3165f
cc3f5f7
* Thu Dec 19 2013 Mosaab Alzoubi <moceap@hotmail.com> - 0-4.20131219git
cc3f5f7
- Update.
cc3f5f7
- General tweaks.
cc3f5f7
- Remove META main package.
cc3f5f7
- Rename -core into -devel.
cc3f5f7
- Remove main package from other packages requires.
cc3f5f7
- -docs requires -devel.
cc3f5f7
- Move main requires to -devel ones.
cc3f5f7
- -devel provides main package.
cc3f5f7
- Remove un-need-to-list-BRs diffutils make coreutils patch.
cc3f5f7
- United path for documents for all packages.
cc3f5f7
cc3f5f7
* Sun Dec 1 2013 Mosaab Alzoubi <moceap@hotmail.com> - 0-3.20131201git
cc3f5f7
- Update.
cc3f5f7
cc3f5f7
* Thu Nov 14 2013 Mosaab Alzoubi <moceap@hotmail.com> - 0-2.20131112git
06f1309
- Fix tag method to 0-$rel.$gitdategit instead of $ver.git$gitdate-$rel.
cc3f5f7
- Release number will increas by new git snapshot.
cc3f5f7
cc3f5f7
* Tue Nov 12 2013 Mosaab Alzoubi <moceap@hotmail.com> - 0.1.git20131112-1
cc3f5f7
- After more 6 years in 0.0, GnuLib 0.1 released.
cc3f5f7
- Replace version method to $ver.git$gitdate instead of $gitdate.git$githead.
cc3f5f7
- Update to 0.1.git20131112.
cc3f5f7
cc3f5f7
* Fri Nov 1 2013 Mosaab Alzoubi <moceap@hotmail.com> - 20131030.git5c508f6-2
cc3f5f7
- Decrease description of git-merge-changelog
cc3f5f7
- Add license file to git-merge-changelog
cc3f5f7
cc3f5f7
* Wed Oct 30 2013 Mosaab Alzoubi <moceap@hotmail.com> - 20131030.git5c508f6-1
cc3f5f7
- Update to 20131030.git5c508f6
cc3f5f7
- Create -core noarch package, because rpmbuild can't drive arched subpackage from nonarched main one.
cc3f5f7
- Some General Fixes.
cc3f5f7
- Add 1st sample form - Module Sample: (Alpha Version)
cc3f5f7
- Add 1st module single package - git-merge-changelog
cc3f5f7
cc3f5f7
* Mon Oct 28 2013 Mosaab Alzoubi <moceap@hotmail.com> - 20131027.git5191b35-2
cc3f5f7
- Fixes after Zbigniew Jędrzejewski-Szmek revision:
cc3f5f7
- Remove prebuilt java class.
cc3f5f7
- gnulib-docs require gnulib.
cc3f5f7
- List all licenses.
cc3f5f7
- Replace define by global.
cc3f5f7
cc3f5f7
* Sun Oct 27 2013 Mosaab Alzoubi <moceap@hotmail.com> - 20131027.git5191b35-1
cc3f5f7
- Update.
cc3f5f7
cc3f5f7
* Sat Oct 26 2013 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 20131022.git25fb29a-4
cc3f5f7
- Spec file tweaks.
cc3f5f7
- Package MODULES.html.
cc3f5f7
cc3f5f7
* Thu Oct 24 2013 Mosaab Alzoubi <moceap@hotmail.com> - 20131022.git25fb29a-3
cc3f5f7
- Many Fixes.
cc3f5f7
cc3f5f7
* Thu Oct 24 2013 Mosaab Alzoubi <moceap@hotmail.com> - 20131022.git25fb29a-2
cc3f5f7
- Many Fixes.
cc3f5f7
cc3f5f7
* Tue Oct 22 2013 Mosaab Alzoubi <moceap@hotmail.com> - 20131022.git25fb29a-1
cc3f5f7
- Initial build.