# Tests by default. No tests: rpm -ba --define 'dotests 0' *.spec %{!?dotests: %define dotests 1} Summary: A GNU stream text editor. Name: sed Version: 4.5 Release:3 License: GPL Group: Applications/Text URL: http://www.gnu.org/software/sed Source0: ftp://ftp.gnu.org/gnu/sed/sed-%{version}.tar.xz Prefix: %{_prefix} Buildroot: /var/tmp/%{name}-root %define DEFCC cc Requires: gettext >= 0.19.8.1 BuildRequires: gettext-devel >= 0.19.8.1 %description The sed (Stream EDitor) editor is a stream or batch (non-interactive) editor. Sed takes text as input, performs an operation or set of operations on the text and outputs the modified text. The operations that sed performs (substitutions, deletions, insertions, etc.) can be specified in a script file or from the command line. %prep %setup -q #Duplicate source for 32 & 64 bits rm -rf /tmp/%{name}-%{version}-32bit mkdir /tmp/%{name}-%{version}-32bit mv * /tmp/%{name}-%{version}-32bit mkdir 32bit mv /tmp/%{name}-%{version}-32bit/* 32bit rm -rf /tmp/%{name}-%{version}-32bit mkdir 64bit cp -rp 32bit/* 64bit/ %build #first build the 64bit version cd 64bit export CC="gcc -maix64" export OBJECT_MODE=64 export CFLAGS=$RPM_OPT_FLAGS %configure --exec-prefix=%{_prefix} ./configure --exec-prefix=%{_prefix} --prefix=$RPM_BUILD_ROOT make LDFLAGS="-s -L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" CFLAGS=-D_LARGE_FILES if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi #Now build the 32bit version cd ../32bit export CC="gcc -maix32 -D_LARGE_FILES" export OBJECT_MODE=32 export CFLAGS=$RPM_OPT_FLAGS %configure --exec-prefix=%{_prefix} ./configure --exec-prefix=%{_prefix} --prefix=$RPM_BUILD_ROOT make LDFLAGS="-s -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" CFLAGS=-D_LARGE_FILES if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi %install rm -rf $RPM_BUILD_ROOT cd 64bit export AR="/usr/bin/ar -X64" export OBJECT_MODE=64 make prefix=$RPM_BUILD_ROOT/%{_prefix} \ exec_prefix=$RPM_BUILD_ROOT/%{_prefix} \ infodir=${RPM_BUILD_ROOT}%{_prefix}/info \ mandir=${RPM_BUILD_ROOT}%{_prefix}/man \ install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * do mv ${f} ${f}_64 done ) cd ../32bit export AR="/usr/bin/ar -X32" export OBJECT_MODE=32 make prefix=$RPM_BUILD_ROOT/%{_prefix} \ exec_prefix=$RPM_BUILD_ROOT/%{_prefix} \ infodir=${RPM_BUILD_ROOT}%{_prefix}/info \ mandir=${RPM_BUILD_ROOT}%{_prefix}/man \ install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in sed do mv ${f} ${f}_32 done ) # Make 64bit executable as default ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in sed do ln -sf ${f}_64 ${f} done ) ( cd $RPM_BUILD_ROOT mkdir -p usr/linux/bin ln -sf ../../..%{_prefix}/bin/sed* usr/linux/bin/ gzip -9nf .%{_prefix}/info/sed.info* rm -f .%{_prefix}/info/dir ) %post /sbin/install-info %{_prefix}/info/sed.info.gz %{_prefix}/info/dir %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_prefix}/info/sed.info.gz %{_prefix}/info/dir fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system) %doc 32bit/AUTHORS 32bit/BUGS 32bit/COPYING 32bit/NEWS 32bit/README 32bit/THANKS %{_prefix}/bin/sed* /usr/linux/bin/sed* %{_prefix}/info/sed.info* %{_prefix}/man/man1/* %changelog * Wed Nov 27 2019 Reshma V Kumar 4.5-3 - Rebuild to set proper libpath * Fri Jun 21 2019 Harshita Jain 4.5-2 - Rebuild due to symbolic link is broken issue * Mon Jul 30 2018 Harshita Jain 4.5-1 - Updated to latest version 4.5-1 * Wed Feb 01 2012 Gerard Visiedo 4.2.1-4 - Initial port on Aix6.1 * Thu Sep 22 2011 Patricia Cugny 4.2.1-3 - rebuild for compatibility with new libiconv.a 1.13.1-2 * Wed Jun 8 2011 Gerard Visiedo 4.2.1-2 - Compil on toolbox3 * Wed Jun 2 2010 Jean Noel Cordenner 4.2.1 - Update to 4.2.1 * Fri May 20 2005 David Clissold 4.1.1-1 - Update to 4.1.1 * Tue Nov 25 2003 David Clissold 4.0.7-1 - Update to 4.0.7 * Wed Mar 26 2003 David Clissold - Build with IBM VAC compiler. * Tue Apr 03 2001 David Clissold - Build with -D_LARGE_FILES enabled (for >2BG files) * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Mon Feb 7 2000 Jeff Johnson - compress man pages. * Tue Jan 18 2000 Jakub Jelinek - rebuild with glibc 2.1.3 to fix an mmap64 bug in sys/mman.h * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 4) * Tue Aug 18 1998 Jeff Johnson - update to 3.02 * Sun Jul 26 1998 Jeff Johnson - update to 3.01 * Mon Apr 27 1998 Prospector System - translations modified for de, fr, tr * Thu Oct 23 1997 Donnie Barnes - removed references to the -g option from the man page that we add * Fri Oct 17 1997 Donnie Barnes - spec file cleanups - added BuildRoot * Mon Jun 02 1997 Erik Troan - built against glibc