%define dotests 1 %define _libdir64 %{_prefix}/lib64 Summary: Automated text file generator Name: autogen Version: 5.18.16 Release: 1 # Some files are licensed under GPLv2+. # We redistribute them under GPLv3+. License: GPLv3+ Group: Development/Tools URL: http://www.gnu.org/software/autogen/ Source0: ftp://ftp.gnu.org/gnu/autogen/rel5.12/%{name}-%{version}.tar.xz #Source1: %{name}-%{version}-pkgconfig.patch Source2: %{name}-%{version}-lintl.patch #Source100: %{name}-%{version}-%{release}.build.log # Patch to avoid warnings treating as errors Patch0: %{name}-%{version}-werror-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: guile-devel >= 2.2.0-1 BuildRequires: libunistring-devel >= 0.9.9-2 BuildRequires: libtool BuildRequires: libxml2-devel BuildRequires: perl Requires: perl Requires: bash Requires: guile >= 2.2.0-1 Requires: xz-libs >= 5.2.4-1 Requires: libxml2 >= 2.9.7-1 Requires: %{name}-libopts = %{version}-%{release} %description AutoGen is a tool designed to simplify the creation and maintenance of programs that contain large amounts of repetitious text. It is especially valuable in programs that have several blocks of text that must be kept synchronised. This package is available in 32bit and 64bit. %package libopts Summary: Automated option processing library based on %{name} # Although sources are dual licensed with BSD, some autogen generated files # are only under LGPLv3+. We drop BSD to avoid multiple licensing scenario. License: LGPLv3+ Group: System Environment/Libraries BuildRequires: gettext-devel >= 0.19.8.1-3 Requires: gettext >= 0.19.8.1-3 Requires: libgcc >= 6.3.0 %description libopts Libopts is very powerful command line option parser consisting of a set of AutoGen templates and a run time library that nearly eliminates the hassle of parsing and documenting command line options. %package libopts-devel Summary: Development files for libopts # Although sources are dual licensed with BSD, some autogen generated files # are only under LGPLv3+. We drop BSD to avoid multiple licensing scenario. License: LGPLv3+ Group: Development/Libraries Requires: automake Requires: %{name}-libopts = %{version}-%{release} Requires: pkg-config %description libopts-devel This package contains development files for libopts. %prep %setup -q -n %{name}-%{version} #patch -p1 < %{SOURCE1} patch -p1 < %{SOURCE2} %patch0 -p0 %build # Due to a bug, the build breaks with this message: columns program is not findable # A work-around is to add a symlink to columns installed with previous version of autogen # I'm not sure the columns built by this version works fine... # ln -s /opt/freeware/bin/columns /columns # # Tests need the 64bit/32bit version... so 2 symlink are executed when testing. # So: 1) Build 2) Install 3) Build&Test # if test -L /columns; then echo "/columns is there !" else echo "/columns is missing !" echo "Do: ln -s /opt/freeware/bin/columns /columns" exit fi # # The issue deals with: # autoopts/tpl/agtexi-cmd.tpl : # (shell "CLexe=${AGexe%/agen5/*}/columns/columns # where AGexe is empty. # Code thus looks for: /columns/columns and then /columns . export CFLAGS="-O2" export M4=/usr/linux/bin/m4 export RM="/usr/bin/rm -f" #first build the 64-bit version export STRIP="i/usr/bin/strip -X64" export CC="gcc -maix64" export CXX="g++ -maix64" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export OBJECT_MODE=64 export AR="/usr/bin/ar -X64" export NM="/usr/bin/nm -X64" CONFIG_SHELL=/bin/bash ./configure \ --prefix=%{_prefix} \ --disable-dependency-tracking \ --libdir=%{_libdir} gmake #%{?_smp_mflags} if [ "%{dotests}" == 1 ] then ( gmake -k check || true ) /usr/sbin/slibclean fi %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} export RM="/usr/bin/rm -f" gmake install INSTALL="%{_bindir}/install -p" DESTDIR=$RPM_BUILD_ROOT /usr/sbin/slibclean /usr/bin/strip -X64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ls -lR $RPM_BUILD_ROOT %clean /usr/bin/rm -rf $RPM_BUILD_ROOT %post /sbin/install-info %{_prefix}/share/info/%{name}.info %{_prefix}/share/info/dir || : %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_prefix}/share/info/%{name}.info \ %{_prefix}/share/info/dir >/dev/null 2>&1 || : fi %files %defattr(-,root,system,-) %doc AUTHORS %doc ChangeLog %doc COPYING %doc NEWS %doc README %doc THANKS %doc pkg/libopts/COPYING.gplv3 %{_bindir}/columns* %{_bindir}/getdefs* %{_bindir}/%{name}* %{_bindir}/xml2ag* %{_prefix}/share/info/autogen.info %dir %{_datadir}/%{name} %{_datadir}/%{name}/* %files libopts %defattr(-,root,system,-) %doc pkg/libopts/COPYING.mbsd %doc pkg/libopts/COPYING.lgplv3 %{_libdir}/*.a %files libopts-devel %defattr(-,root,system,-) %{_bindir}/autoopts-config* %{_datadir}/aclocal/autoopts.m4 %{_libdir}/pkgconfig/autoopts.pc %dir %{_includedir}/autoopts %{_includedir}/autoopts/options.h %{_includedir}/autoopts/usage-txt.h %changelog * Mon Dec 17 2018 Ravi Hirekurabar - 5.18.16-1 - Initial port on AIX 6.1