| 1 | # -*- coding: utf-8 -*-
|
|---|
| 2 | %ifos linux
|
|---|
| 3 | %define _bindir /bin
|
|---|
| 4 | %endif
|
|---|
| 5 |
|
|---|
| 6 | Summary: A GNU stream text editor
|
|---|
| 7 | Name: sed
|
|---|
| 8 | Version: 4.2.1
|
|---|
| 9 | Release: 2%{?dist}
|
|---|
| 10 | License: GPLv3+
|
|---|
| 11 | Group: Applications/Text
|
|---|
| 12 | URL: http://sed.sourceforge.net/
|
|---|
| 13 | Source0: ftp://ftp.gnu.org/pub/gnu/sed/sed-%{version}.tar.bz2
|
|---|
| 14 | Source1: http://sed.sourceforge.net/sedfaq.txt
|
|---|
| 15 | Patch0: sed-4.2.1-copy.patch
|
|---|
| 16 | Patch1: sed-4.2.1-makecheck.patch
|
|---|
| 17 | Patch2: sed-os2.patch
|
|---|
| 18 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|---|
| 19 | BuildRequires: libc-devel
|
|---|
| 20 |
|
|---|
| 21 | %description
|
|---|
| 22 | The sed (Stream EDitor) editor is a stream or batch (non-interactive)
|
|---|
| 23 | editor. Sed takes text as input, performs an operation or set of
|
|---|
| 24 | operations on the text and outputs the modified text. The operations
|
|---|
| 25 | that sed performs (substitutions, deletions, insertions, etc.) can be
|
|---|
| 26 | specified in a script file or from the command line.
|
|---|
| 27 |
|
|---|
| 28 | %prep
|
|---|
| 29 | %setup -q
|
|---|
| 30 | %patch0 -p1
|
|---|
| 31 | %patch1 -p1
|
|---|
| 32 | %patch2 -p1
|
|---|
| 33 |
|
|---|
| 34 | %build
|
|---|
| 35 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
|
|---|
| 36 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 37 | export LIBS="-lurpo -lmmap"
|
|---|
| 38 | %configure \
|
|---|
| 39 | --without-included-regex \
|
|---|
| 40 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
|---|
| 41 |
|
|---|
| 42 | make %{_smp_mflags}
|
|---|
| 43 | install -m 644 -p %{SOURCE1} sedfaq.txt
|
|---|
| 44 | gzip -9 sedfaq.txt
|
|---|
| 45 |
|
|---|
| 46 | #%check
|
|---|
| 47 | #echo ====================TESTING=========================
|
|---|
| 48 | #make check
|
|---|
| 49 | #echo ====================TESTING END=====================
|
|---|
| 50 |
|
|---|
| 51 | %install
|
|---|
| 52 | rm -rf ${RPM_BUILD_ROOT}
|
|---|
| 53 | make DESTDIR=$RPM_BUILD_ROOT install
|
|---|
| 54 | rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir
|
|---|
| 55 | rm -f $RPM_BUILD_ROOT/%{_libdir}/charset.alias
|
|---|
| 56 |
|
|---|
| 57 | #%find_lang %{name}
|
|---|
| 58 |
|
|---|
| 59 | %clean
|
|---|
| 60 | rm -rf ${RPM_BUILD_ROOT}
|
|---|
| 61 |
|
|---|
| 62 | %files
|
|---|
| 63 | # -f %{name}.lang
|
|---|
| 64 | %defattr(-,root,root)
|
|---|
| 65 | %doc BUGS NEWS THANKS README AUTHORS sedfaq.txt.gz COPYING COPYING.DOC
|
|---|
| 66 | %{_bindir}/sed.exe
|
|---|
| 67 | %{_infodir}/*.info*
|
|---|
| 68 | %{_mandir}/man*/*
|
|---|
| 69 | %{_datadir}/locale/*
|
|---|
| 70 |
|
|---|
| 71 | %changelog
|
|---|
| 72 | * Sun Jan 08 2012 yd
|
|---|
| 73 | - fixed requirements.
|
|---|
| 74 |
|
|---|
| 75 | * Sat Jan 07 2012 yd
|
|---|
| 76 | - initial unixroot build.
|
|---|