# Tests by default. No tests: rpm -ba --define 'dotests 0' *.spec %{!?dotests: %define dotests 1} %define _libdir64 %{_prefix}/lib64 Name: augeas Version: 1.12.0 Release: 1 Summary: A library for changing configuration files Group: System Environment/Libraries License: LGPLv2+ URL: http://augeas.net/ Source0: http://augeas.net/download/%{name}-%{version}.tar.gz BuildRequires: make BuildRequires: libxml2-devel >= 2.9.9-1 BuildRequires: readline-devel >= 8.0-2 Requires: %{name}-libs = %{version}-%{release} Requires: readline >= 8.0-2 Requires: libxml2 >= 2.9.9-1 %description A library for programmatically editing configuration files. Augeas parses configuration files into a tree structure, which it exposes through its public API. Changes made through the API are written back to the initially read files. The transformation works very hard to preserve comments and formatting details. It is controlled by ``lens'' definitions that describe the file format and the transformation into a tree. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name}-libs = %{version}-%{release} Requires: pkg-config %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %package libs Summary: Libraries for %{name} Group: System Environment/Libraries Requires: libgcc >= 8.3.0-1 Requires: libxml2 >= 2.9.9-1 %description libs The libraries for %{name}. The library is available as 32-bit and 64-bit. %prep %setup -q %build export PATH=/opt/freeware/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:. export LIBPATH= export RM="/usr/bin/rm -f" export AR="/usr/bin/ar -X32_64" export NM="/usr/bin/nm -X32_64" export CONFIG_SHELL=/opt/freeware/bin/bash export CONFIG_ENV_ARGS=/opt/freeware/bin/bash export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include -D_LARGE_FILES" # hardcodes /opt/freeware/lib/libxml2.a in the library search path export LIBXML_LIBS="/opt/freeware/lib/libxml2.a" export CC="/opt/freeware/bin/gcc -O2 -maix64" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static gmake %{?_smp_mflags} if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi cd .. %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} export PATH=/opt/freeware/bin:$PATH gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : #( # cd ${RPM_BUILD_ROOT}%{_libdir64} # for f in *.a ; do # /usr/bin/ar -X64 -x ${f} # done # ls -l #) # The tests/ subdirectory contains lenses used only for testing, and # so it shouldn't be packaged. rm -r ${RPM_BUILD_ROOT}%{_datadir}/augeas/lenses/dist/tests %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %{_bindir}/augtool* %{_bindir}/augparse* %{_bindir}/fadot* %{_mandir}/man1/* %{_datadir}/vim/vimfiles/syntax/augeas.vim %{_datadir}/vim/vimfiles/ftdetect/augeas.vim %files libs %defattr(-,root,system,-) %doc AUTHORS COPYING NEWS %{_libdir64}/*.a %{_datadir}/%{name} %files devel %defattr(-,root,system,-) %doc AUTHORS COPYING NEWS %{_includedir}/* %{_libdir64}/pkgconfig/augeas.pc %changelog * Wed Sep 09 2020 Rishita Saha - 1.12.0-1 - Initial port to AIX Toolbox * Thu Mar 27 2014 Michael Perzl - 1.2.0-1 - updated to version 1.2.0 * Tue Dec 10 2013 Michael Perzl - 1.1.0-1 - first version for AIX V5.1 and higher