Creating an rpm from scratch
Reindl Harald
h.reindl at thelounge.net
Sat Mar 16 01:29:36 UTC 2013
Am 15.03.2013 23:02, schrieb Bill Davidsen:
> Reindl Harald wrote:
>>> Sounds like NO, there has been progress in documentation since 2.5 days, but sounds like it all has to be created
>>> by hand in terms of scripts, spec files, etc. Thanks, but if it hasn't gotten less time consuming in 12-15 years,
>>> let it be someone else's time.
>>>
>>> Thanks much for the pointer to better documentation, that has improved
>>
>> oh come on this is laughable
>>
>> take a existing SPEC and change the sources
>> leave the %files empty and after teh first
>> build you get a complete list of unpacked files
>>
>> start a new package by hand usausally takes 2-5 minutes
>>
> Your use of "new package" and "existing SPEC" in the same answer makes
> me sure you haven't understood the question
no you did not understand the answer!
take the simplest src.rpm, unapck it and made
a few changes for whatever you want to package
> Since "RPMcreator" isn't in any recent Redhat release I can find, nor
> on any of the usual other sites, I assume
> there is another tool used, I just want the name of the tool!
what the hell did you not understand in "rpmbuild"
[builduser at buildserver:~/SPECS]$ rpmbuild -bb webalizer-xtended.spec
Ausführung(%prep): /bin/sh -e /var/tmp/rpm-tmp.UtiePL
+ umask 022
+ cd /home/builduser/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/builduser/rpmbuild/BUILD
+ rm -rf webalizer-2.23-05-RB29
+ /usr/bin/gzip -dc /home/builduser/rpmbuild/SOURCES/webalizer-2.23-05-RB29-src.tar.gz
+ /usr/bin/tar -xf -
..........................
Requires: libGeoIP.so.1()(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libc.so.6(GLIBC_2.7)(64bit)
libgd.so.2()(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.2.5)(64bit) libpng15.so.15()(64bit) libz.so.1()(64bit)
rtld(GNU_HASH)
Processing files: webalizer-xtended-debuginfo-2.23_05_RB29-7.fc17.20130316.rh.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/home/builduser/rpmbuild/BUILDROOT/webalizer-xtended-2.23_05_RB29-7.fc17.20130316.rh.x86_64
Wrote: /home/builduser/rpmbuild/RPMS/x86_64/webalizer-xtended-2.23_05_RB29-7.fc17.20130316.rh.x86_64.rpm
Wrote: /home/builduser/rpmbuild/RPMS/x86_64/webalizer-xtended-debuginfo-2.23_05_RB29-7.fc17.20130316.rh.x86_64.rpm
__________________________
[builduser at buildserver:~/SPECS]$ cat webalizer-xtended.spec
%define ver 2.23
%define patchlevel 05
%define xtendedver RB29
%define _default_patch_fuzz 2
Name: webalizer-xtended
Summary: A flexible Web server log file analysis program.
Group: Applications/Internet
Version: %{ver}_%{patchlevel}_%{xtendedver}
Release: 7%{?dist}
URL: http://www.patrickfrei.ch/webalizer/
License: GPL V2
BuildRoot: %{_tmppath}/%{name}-root
Source0: http://www.patrickfrei.ch/webalizer/rb29/webalizer-%{ver}-%{patchlevel}-%{xtendedver}-src.tar.gz
BuildRequires: gd-devel
BuildRequires: zlib-devel
BuildRequires: libpng-devel
BuildRequires: db4-devel
BuildRequires: m4
BuildRequires: make
BuildRequires: bzip2-devel
BuildRequires: GeoIP-devel
Requires: shadow-utils
Requires: fileutils
Requires: webserver
Requires: bzip2
Requires: GeoIP
Requires: db4
Provides: webalizer = %{version}-%{release}
Provides: webalizer-xtended = %{version}-%{release}-%{xtendedver}
%description
The Webalizer is a Web server log analysis program. It is designed to
scan Web server log files in various formats and produce usage
statistics in HTML format for viewing through a browser. It produces
professional looking graphs which make analyzing when and where your
Web traffic is coming from easy. Webalizer Xtended is a fork of this
and has been developed by Patrick Frei (Frei Software Development)
%prep
%setup -q -n webalizer-%{ver}-%{patchlevel}-%{xtendedver}
%build
source /home/builduser/config.sh
export CPPFLAGS="-I%{_includedir}/db4 -O2 -march=$RH_TUNE -mtune=$RH_TUNE -mmmx -msse2 -msse3 $RH_SSE4
-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fexceptions"
export CFLAGS="-O2 -march=$RH_TUNE -mtune=$RH_TUNE -mmmx -msse2 -msse3 $RH_SSE4 -fopenmp -mfpmath=sse -pipe
-fno-strict-aliasing -fstack-protector --param=ssp-buffer-size=4 -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -fexceptions"
export CXXFLAGS="-O2 -march=$RH_TUNE -mtune=$RH_TUNE -mmmx -msse2 -msse3 $RH_SSE4 -fopenmp -mfpmath=sse
-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fexceptions"
%configure --with-language=german --enable-geoip --enable-dns=no --without-db
%{__make} %{?_smp_mflags}
%install
rm -fr $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir} \
$RPM_BUILD_ROOT/%{_mandir}/man1 \
$RPM_BUILD_ROOT/etc \
$RPM_BUILD_ROOT/var/www/usage \
$RPM_BUILD_ROOT/var/lib/webalizer
cp webalizer.1* $RPM_BUILD_ROOT/%{_mandir}/man1/
cp webalizer $RPM_BUILD_ROOT/%{_bindir}/
rm -f $RPM_BUILD_ROOT/etc/webalizer.conf.sample
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README
%{_mandir}/man1/webalizer.1*
%{_bindir}/*
%changelog
* Fri Apr 22 2011 Reindl Harald <h.reindl at thelounge.net>
- Update to RB29
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20130316/966dc5c0/attachment.sig>
More information about the users
mailing list