[devel] autoconf 2.5

Alexey Voinov =?iso-8859-1?q?voins_=CE=C1_voins=2Eprogram=2Eru?=
Сб Дек 8 20:09:03 MSK 2001


Всем привет.
Приспичило мне тут на днях попользоваться autoconf-2.5.
Всвязи с этим появилась задача: подружить его с autoconf-2.13
так чтобы они друг другу мешали как можно меньше, а в идеале вообще бы не
мешали.

Не знаю правильно я сделал или нет (то что нексолько кривовато --- это
точно), но я их слегка подружил с помощью update-alternatives.
(наконец-то я с ним разобрался)

В аттаче лежат 2 спека: autoconf.spec и autoconf-2.5.spec. 

Для правильного вызова невыбранного autoheader нужно сказать export
AUTOCONF=/usr/conf<правильный autoconf>. Скрипты autogen.sh надо править,
они вызывают autoconf и autoheader по имени, не через переменную
окружения.

Прошу посмотреть и причесать.

-- 
Best Regards!           | Когда вам платят за работу, надо по крайней мере
Alexey Voinov           | делать вид, что вы работаете...
                        |                         Б.Виан "Осень в Пекине"
voins на voins.program.ru
voins на online.ru
vns на altlinux.ru

----------- следующая часть -----------

Name: autoconf25
Version: 2.52b
Release: alt1.1

Summary: A GNU tool for automatically configuring source code
License: GPL
Group: Development/Other
Url: http://sourceware.cygnus.com/autoconf/
BuildArch: noarch
AutoReqProv: yes, perl

Source: ftp://alpha.gnu.org/gnu/autoconf/autoconf-%version.tar.bz2

PreReq: %__install_info
Requires: m4, mktemp

Prefix: %prefix
Provides: autoconf = 2.52b-alt1.1

%description
GNU's Autoconf is a tool for configuring source code and Makefiles.
Using Autoconf, programmers can create portable and configurable
packages, since the person building the package is allowed to
specify various configuration options.

You should install Autoconf if you are developing software and you'd
like to use it to create shell scripts which will configure your
source code packages. If you are installing Autoconf, you will also
need to install the GNU m4 package.

Note that the Autoconf package is not required for the end user who
may be configuring software with an Autoconf-generated script;
Autoconf is only required for the generation of the scripts, not
their use.

%prep
%setup -q -n autoconf-%version
find -type f -print0 |
	xargs -r0 fgrep -l 'mawk gawk' |
	xargs -r perl -pi -e 's/mawk gawk/gawk mawk/g'

%build
%configure
%make_build

%install
%makeinstall

# We don't want to include the standards.info stuff in the package,
# because it comes from binutils...
rm -f $RPM_BUILD_ROOT%_infodir/standards*

for f in $RPM_BUILD_ROOT%_bindir/*; do
 sed -e 's@/usr/share/autoconf@/usr/share/autoconf25@' <$f >${f}25
 rm $f
 chmod a+x ${f}25 
done

cd $RPM_BUILD_ROOT%_bindir
 ln -s autom4te25 autom4te
cd -

for f in $RPM_BUILD_ROOT%_man1dir/*; do
 mv $f ${f%%.1}25.1
done

sed	-e's/(autoconf)/(autoconf25)/g' -e 's/* Autoconf:/* Autoconf-2.5:/g' \
  	-e's/* config.status:/* config.status-2.5:/g' \
  	-e's/* configure:/* configure-2.5:/g' \
  	-e's/* autoreconf:/* autoreconf-2.5:/g' \
  	-e's/* autoconf:/* autoconf-2.5:/g' \
  	-e's/* ifnames:/* ifnames-2.5:/g' \
  	-e's/* autoscan:/* autoscan-2.5:/g' \
	< $RPM_BUILD_ROOT%_infodir/autoconf.info > $RPM_BUILD_ROOT%_infodir/autoconf25.info
rm $RPM_BUILD_ROOT%_infodir/autoconf.info

mv $RPM_BUILD_ROOT%_datadir/autoconf $RPM_BUILD_ROOT%_datadir/%name
install -p -m755 config/*-sh $RPM_BUILD_ROOT%_datadir/%name
rm -f $RPM_BUILD_ROOT%_datadir/%name/INSTALL


%post
/usr/sbin/update-alternatives --install %_bindir/autoconf autoconf %_bindir/autoconf25 10 \
	--slave %_bindir/autoheader autoheader %_bindir/autoheader25 \
	--slave %_bindir/autoreconf autoreconf %_bindir/autoreconf25 \
	--slave %_bindir/autoscan autoscan %_bindir/autoscan25 \
	--slave %_bindir/autoupdate autoupdate %_bindir/autoupdate25 \
	--slave %_bindir/ifnames ifname %_bindir/ifnames25 \
	--slave %_datadir/autoconf autoconfdata %_datadir/autoconf25 
%install_info %name.info

%triggerpostun -- %name < %version-%release
/usr/sbin/update-alternatives --install %_bindir/autoconf autoconf %_bindir/autoconf25 10 \
	--slave %_bindir/autoheader autoheader %_bindir/autoheader25 \
	--slave %_bindir/autoreconf autoreconf %_bindir/autoreconf25 \
	--slave %_bindir/autoscan autoscan %_bindir/autoscan25 \
	--slave %_bindir/autoupdate autoupdate %_bindir/autoupdate25 \
	--slave %_bindir/ifnames ifname %_bindir/ifnames25 \
	--slave %_datadir/autoconf autoconfdata %_datadir/autoconf25 

%preun
[ $1 = 0 ] || exit 0
%uninstall_info %name.info
/usr/sbin/update-alternatives --remove autoconf %_bindir/autoconf25

%files
%_bindir/*
%_datadir/%name
%_man1dir/*
%_infodir/*.info*

%changelog
* Sat Dec 08 2001 Alexey Voinov <voins на voins.program.ru> 2.52b-alt1.1
- update-alternatives support added

* Mon Aug 20 2001 Dmitry V. Levin <ldv на altlinux.ru> 2.52b-alt1
- 2.52b

* Fri Aug 17 2001 Dmitry V. Levin <ldv на altlinux.ru> 2.52-alt1
- 2.52
- Added manpages from debian.

* Sun Dec 24 2000 Dmitry V. Levin <ldv на fandra.org> 2.13-ipl5mdk
- Fixed exit function prototype for gcc >= 2.96.

* Wed Jul 19 2000 Dmitry V. Levin <ldv на fandra.org> 2.13-ipl4mdk
- RE adaptions.

* Tue Jul 18 2000 Guillaume Cottenceau <gc на mandrakesoft.com> 2.13-4mdk
- macros for install-info

* Mon Jul 10 2000 Guillaume Cottenceau <gc на mandrakesoft.com> 2.13-3mdk
- cleanup and macros

* Fri Mar 31 2000 Guillaume Cottenceau <gc на mandrakesoft.com> 2.13-2mdk
- new groups

* Mon Mar  6 2000 Chmouel Boudjnah <chmouel на mandrakesoft.com> 2.13-1mdk
- Back to last 2.13 and stable version, add a serial.

* Wed Oct 27 1999 Chmouel Boudjnah <chmouel на mandrakesoft.com>
- Merge change of Jeff package.

* Thu May 13 1999 Bernhard Rosenkraenzer <bero на mandrakesoft.com>
- Mandrake adaptions
- 2.14.1

* Fri Mar 26 1999 Cristian Gafton <gafton на redhat.com>
- add patch to help autoconf clean after itself and not leave /tmp clobbered
  with acin.* and acout.* files (can you say annoying?)

* Sun Mar 21 1999 Cristian Gafton <gafton на redhat.com>
- auto rebuild in the new build environment (release 4)
- use gawk, not mawk

* Thu Mar 18 1999 Preston Brown <pbrown на redhat.com>
- moved /usr/lib/autoconf to /usr/share/autoconf (with automake)

* Wed Feb 24 1999 Preston Brown <pbrown на redhat.com>
- Injected new description and group.

* Tue Jan 12 1999 Jeff Johnson <jbj на redhat.com>
- update to 2.13.

* Fri Dec 18 1998 Cristian Gafton <gafton на redhat.com>
- build against glibc 2.1

* Mon Oct 05 1998 Cristian Gafton <gafton на redhat.com>
- requires perl

* Thu Aug 27 1998 Cristian Gafton <gafton на redhat.com>
- patch for fixing /tmp race conditions

* Sun Oct 19 1997 Erik Troan <ewt на redhat.com>
- spec file cleanups
- made a noarch package
- uses autoconf
- uses install-info

* Thu Jul 17 1997 Erik Troan <ewt на redhat.com>
- built with glibc

----------- следующая часть -----------
Name: autoconf
Version: 2.13
Release: alt2.1
Serial: 2

Summary: A GNU tool for automatically configuring source code
License: GPL
Group: Development/Other
Url: http://sourceware.cygnus.com/%name/
BuildArch: noarch
AutoReqProv: yes, perl

Source: %name-%version.tar.bz2
Source1: %name-2.13-manpages.tar

Patch1: %name-2.13-tmpfiles.patch
Patch2: %name-2.13-c++exit.patch
Patch3: %name-2.13-headers.patch
Patch4: %name-2.13-autoscan.patch
Patch5: %name-2.13-exit.patch

PreReq: %__install_info
Requires: m4, mktemp

Prefix: %prefix

%description
GNU's Autoconf is a tool for configuring source code and Makefiles.
Using Autoconf, programmers can create portable and configurable
packages, since the person building the package is allowed to
specify various configuration options.

You should install Autoconf if you are developing software and you'd
like to use it to create shell scripts which will configure your
source code packages. If you are installing Autoconf, you will also
need to install the GNU m4 package.

Note that the Autoconf package is not required for the end user who
may be configuring software with an Autoconf-generated script;
Autoconf is only required for the generation of the scripts, not
their use.

%prep
%setup -q -a1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

find -type f -print0 |
	xargs -r0 fgrep -l 'mawk gawk' |
	xargs -r perl -pi -e 's/mawk gawk/gawk mawk/g'

%build
%configure
%make_build

%install
%makeinstall

# We don't want to include the standards.info stuff in the package,
# since it comes from binutils.
rm -f $RPM_BUILD_ROOT%_infodir/standards*

# Install manpages.
mkdir -p $RPM_BUILD_ROOT%_man1dir
install -p -m644 [a-z]*.1 $RPM_BUILD_ROOT%_man1dir

# Some more helpful scripts.
install -p -m755 *-sh $RPM_BUILD_ROOT%_datadir/%name
rm -f $RPM_BUILD_ROOT%_datadir/%name/INSTALL
mv $RPM_BUILD_ROOT%_datadir/%name/ $RPM_BUILD_ROOT%_datadir/%{name}21

for f in $RPM_BUILD_ROOT%_bindir/*; do
 sed -e's@/usr/share/autoconf@/usr/share/autoconf21@' <$f >${f}21
 rm $f
 chmod a+x ${f}21
done

%post
/usr/sbin/update-alternatives --install %_bindir/autoconf autoconf %_bindir/autoconf21 20 \
	--slave %_bindir/autoheader autoheader %_bindir/autoheader21 \
	--slave %_bindir/autoreconf autoreconf %_bindir/autoreconf21 \
	--slave %_bindir/autoscan autoscan %_bindir/autoscan21 \
	--slave %_bindir/autoupdate autoupdate %_bindir/autoupdate21 \
	--slave %_bindir/ifnames ifname %_bindir/ifnames21 \
	--slave %_datadir/autoconf autoconfdata %_datadir/autoconf21
%install_info %name.info

%triggerpostun -- %name < %version-%release
/usr/sbin/update-alternatives --install %_bindir/autoconf autoconf %_bindir/autoconf21 20 \
	--slave %_bindir/autoheader autoheader %_bindir/autoheader21 \
	--slave %_bindir/autoreconf autoreconf %_bindir/autoreconf21 \
	--slave %_bindir/autoscan autoscan %_bindir/autoscan21 \
	--slave %_bindir/autoupdate autoupdate %_bindir/autoupdate21 \
	--slave %_bindir/ifnames ifname %_bindir/ifnames21 \
	--slave %_datadir/autoconf autoconfdata %_datadir/autoconf21
	
%preun
[ $1 = 0 ] || exit 0
%uninstall_info %name.info
/usr/sbin/update-alternatives --remove autoconf %_bindir/autoconf21

%files
%_bindir/*
%_datadir/%{name}21
%_man1dir/*
%_infodir/*.info*
%doc AUTHORS NEWS README TODO

%changelog
* Sat Dec 08 2001 Alexey Voinov <voins на voins.program.ru> 2:2.13-alt2.1
- update-alternatives support added

* Mon Aug 27 2001 Dmitry V. Levin <ldv на altlinux.ru> 2.13-alt2
- Rebuilt.

* Thu Aug 23 2001 Dmitry V. Levin <ldv на altlinux.ru> 2.13-alt1
- Revert back to stable version.
- Reworked tmp files handling.
- Merged RH patches:
  + acgeneral.m4: fixed exit status;
  + autoscan.pl: patched to get a better choice of init file (#42071),
    to test for CPP after CC (#42072) and to detect C++ source and g++ (#42073).
  + acspecific.m4: include various standard C headers as needed
    by various autoconf tests (#19114);
  + acgeneral.m4, acspecific.m4: back-ported _AC_PROG_CXX_EXIT_DECLARATION
    from version 2.50 to make detection of C++ exit() declaration prototype
    platform independent. The check is done in AC_PROG_CXX with the result
    stored in "confdefs.h". The exit() prototype in AC_TRY_RUN_NATIVE is no
    longer needed.

* Mon Aug 20 2001 Dmitry V. Levin <ldv на altlinux.ru> 2.52b-alt1
- 2.52b

* Fri Aug 17 2001 Dmitry V. Levin <ldv на altlinux.ru> 2.52-alt1
- 2.52
- Added manpages from debian.

* Sun Dec 24 2000 Dmitry V. Levin <ldv на fandra.org> 2.13-ipl5mdk
- Fixed exit function prototype for gcc >= 2.96.

* Wed Jul 19 2000 Dmitry V. Levin <ldv на fandra.org> 2.13-ipl4mdk
- RE adaptions.

* Tue Jul 18 2000 Guillaume Cottenceau <gc на mandrakesoft.com> 2.13-4mdk
- macros for install-info

* Mon Jul 10 2000 Guillaume Cottenceau <gc на mandrakesoft.com> 2.13-3mdk
- cleanup and macros

* Fri Mar 31 2000 Guillaume Cottenceau <gc на mandrakesoft.com> 2.13-2mdk
- new groups

* Mon Mar  6 2000 Chmouel Boudjnah <chmouel на mandrakesoft.com> 2.13-1mdk
- Back to last 2.13 and stable version, add a serial.

* Wed Oct 27 1999 Chmouel Boudjnah <chmouel на mandrakesoft.com>
- Merge change of Jeff package.

* Thu May 13 1999 Bernhard Rosenkraenzer <bero на mandrakesoft.com>
- Mandrake adaptions
- 2.14.1

* Fri Mar 26 1999 Cristian Gafton <gafton на redhat.com>
- add patch to help autoconf clean after itself and not leave /tmp clobbered
  with acin.* and acout.* files (can you say annoying?)

* Sun Mar 21 1999 Cristian Gafton <gafton на redhat.com>
- auto rebuild in the new build environment (release 4)
- use gawk, not mawk

* Thu Mar 18 1999 Preston Brown <pbrown на redhat.com>
- moved /usr/lib/autoconf to /usr/share/autoconf (with automake)

* Wed Feb 24 1999 Preston Brown <pbrown на redhat.com>
- Injected new description and group.

* Tue Jan 12 1999 Jeff Johnson <jbj на redhat.com>
- update to 2.13.

* Fri Dec 18 1998 Cristian Gafton <gafton на redhat.com>
- build against glibc 2.1

* Mon Oct 05 1998 Cristian Gafton <gafton на redhat.com>
- requires perl

* Thu Aug 27 1998 Cristian Gafton <gafton на redhat.com>
- patch for fixing /tmp race conditions

* Sun Oct 19 1997 Erik Troan <ewt на redhat.com>
- spec file cleanups
- made a noarch package
- uses autoconf
- uses install-info

* Thu Jul 17 1997 Erik Troan <ewt на redhat.com>
- built with glibc

----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип     : application/pgp-signature
Размер  : 232 байтов
Описание: =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20011208/16baeee8/attachment-0001.bin>


Подробная информация о списке рассылки Devel