Example Spec File Template
From RPM5 Info
This one is just a RPM5 example spec template for wget, originally posted by Anders F Björklund on the rpm5 users mailing list. It contain most of the rpm5 new feature
- It has no BuildRoot or %clean section
(see this link for the original annuncement from the maintainer [1]
- It uses only the default set of macros - It has complete Source, for use with `rpmbuild -bf` - It has a %track section, for use with `rpmbuild -bt`
Summary: Download utility
Name: wget
Version: 1.11.4
Release: 1
License: GPL
Group: Applications/Internet
URL: http://www.gnu.org/software/wget/
Source: http://ftp.gnu.org/gnu/wget/%{name}-%{version}.tar.gz
%description
The wget command can be used to download files off the internet.
%track
prog %{name} = {
version = %{version}
url = http://ftp.gnu.org/gnu/wget/
regex = %{name}-(__VER__)\.tar\.gz
}
%prep
%setup
%build
%configure
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=$RPM_BUILD_ROOT
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir
%find_lang %{name} || :
%check
### currently broken:
%{__make} test || :
%clean
%post
if [ "$1" = "1" ]; then # first install
for infofile in %{_infodir}/%{name}.info*; do
%{__install_info} $infofile %{_infodir}/dir
done
fi
%preun
if [ "$1" = "0" ]; then # last uninstall
for infofile in %{_infodir}/%{name}.info*; do
%{__install_info} --delete $infofile %{_infodir}/dir
done
fi
%files -f %{name}.lang
%doc AUTHORS COPYING MAILING-LIST NEWS README
%{_mandir}/man1/wget.1*
%{_bindir}/wget%{__exeext}
%{_infodir}/wget.info*
%config(noreplace) %{_sysconfdir}/wgetrc
%changelog
* Mon Dec 29 2008 Anders F Bjorklund <afb@rpm5.org>
- added features
* Mon Dec 22 2008 Anders F Bjorklund <afb@rpm5.org>
- example specfile
