summaryrefslogtreecommitdiffstats
path: root/scripts/autotools/automake.add
blob: 4edc595df9dea187734cdb4bb8e780be03253342 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#
# spec file for automake 
#

%define rpmvers 1.9.6
%define srcvers	1.9.6
%define amvers  1.9

%define _name 	automake

%if "%{_prefix}" != "/usr"
%define name			@rpmprefix@%{_name}-rtems
%define requirements		@rpmprefix@autoconf-rtems >= 2.59
%else
%define name			%{_name}
%define requirements		autoconf >= 2.59
%endif

Name:         %{name}
URL: 	      http://sources.redhat.com/automake
License:      GPL
Group:        @rpmgroup@
Version:      %{rpmvers}
Release:      0%{?dist}
Summary:      Tool for automatically generating GNU style Makefile.in's

BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:    noarch
BuildRequires:  %{requirements} perl help2man
Requires:     %{requirements}
Requires(post):	      	/sbin/install-info
Requires(preun):	/sbin/install-info

Source: ftp://ftp.gnu.org/gnu/automake/automake-%{srcvers}.tar.bz2
Patch0: automake-1.8.1-rtems-20040112-1.diff

%description
Automake is a tool for automatically generating "Makefile.in"s from
files called "Makefile.am". "Makefile.am" is basically a series of
"make" macro definitions (with rules being thrown in occasionally).
The generated "Makefile.in"s are compatible to the GNU Makefile
standards.

%prep
%setup -q -n %{_name}-%{srcvers}
%patch0 -p0

%build
PATH=%{_prefix}/bin:$PATH
./configure --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \
  --bindir=%{_bindir} --datadir=%{_datadir}
make

%install
rm -rf "$RPM_BUILD_ROOT"
make DESTDIR=${RPM_BUILD_ROOT} install

install -m 755 -d $RPM_BUILD_ROOT/%{_mandir}/man1
for i in $RPM_BUILD_ROOT%{_bindir}/aclocal \
  $RPM_BUILD_ROOT%{_bindir}/automake ; 
do
  perllibdir=$RPM_BUILD_ROOT/%{_datadir}/automake-%{amvers} \
  help2man $i > `basename $i`.1
  install -m 644 `basename $i`.1 $RPM_BUILD_ROOT/%{_mandir}/man1
done

gzip -9qf $RPM_BUILD_ROOT%{_infodir}/*.info* 2>/dev/null
gzip -9qf $RPM_BUILD_ROOT%{_mandir}/man?/* 2>/dev/null

rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir

%clean
   rm -rf "$RPM_BUILD_ROOT"

%post 
install-info  --info-dir=%{_infodir} %{_infodir}/automake.info.gz

%preun
if [ $1 -eq 0 ]; then
  install-info --delete --info-dir=%{_infodir} %{_infodir}/automake.info.gz
fi

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README THANKS
%{_bindir}/aclocal*
%{_bindir}/automake*
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/automake.info*.gz
%{_mandir}/man?/*
%{_datadir}/aclocal-%{amvers}
%{_datadir}/automake-%{amvers}