PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : RPMs backen


keiner_1
05.01.03, 05:18
Hallo Mitleser,

hier mein SPEC

[root@cpq01 SPECS]# cat fluxbox.spec
Summary: Fluxbox, a very cool WindowManager!
Name: fluxbox
Version: 0.1.14
License: GPL
Source0: fluxbox-0.1.14.tar.gz
Release: 1
Group: Windowmanager
%description
Do you like the overloaded Desktop like KDE? for a computer with less memory Fluxbox is the best. Fluxbox looks fantastic, this package is very cool.
Summary: a WindowManager
%prep
rm -rf $RPM_BUILD_DIR/*
tar xvfz $RPM_SOURCE_DIR/fluxbox-0.1.14.tar.gz
%setup
%build
%configure
make clean
./configure
%install
make
make install
[root@cpq01 SPECS]#

so sollte es doch ein binary und src-bin geben?????????????
[root@cpq01 SPECS]# rpmbuild -ba fluxbox.spec

[root@cpq01 RPMS]# ls *; pwd
athlon:

i386:

i486:

i586:

i686:

noarch:
/usr/src/redhat/RPMS
[root@cpq01 RPMS]#


cu
adme

dauni
05.01.03, 06:48
Fehlt da nicht was?
http://www.linux-magazin.de/Artikel/ausgabe/2001/04/RPM/rpm.html schreibt unter anderem das da:
%setup
./configure prefix=/usr
%build
make
%install
make install
%files
/usr/bin/nmap
/usr/share/nmap/*
/usr/man/man1/nmap.1

Wie ich das verstanden habe, müssen alle installierten Dateien im Spec drin stehen?

Belkira
05.01.03, 12:55
Eben, keine %files Sektion und auch

%configure
make clean
./configure

ist doppelt. Das %configure Makro reicht. Warum nochmal "make clean" und manuelles configure?

%install
make
make install

Das "make" gehört in die %build Sektion. Für "make install" bietet sich das %makeinstall Makro an.

%prep
rm -rf $RPM_BUILD_DIR/*
tar xvfz $RPM_SOURCE_DIR/fluxbox-0.1.14.tar.gz

Warum packst Du von Hand nochmal aus, obwohl %setup schon ausgepackt?

kth
05.01.03, 13:35
RPMs sollte man nie als root bauen!

Einer der Gründe ist, dass ein Fehler im Spec-File fatale Konsequenzen haben kann. Bsp.:%prep
rm -rf $RPM_BUILT_DIR/*Besser ist es, sich die nötige Verzeichnisstruktur und Konfiguration für einen normalen User anzulegen:mkdir -p ~/rpm/{BUILD,RPMS/athlon,RPMS/i386,RPMS/i486,RPMS/i586,RPMS/i686,RPMS/noarch,SOURCES,SRPMS,SPECS,tmp}
cat > ~/.rpmmacros << EOF
%_topdir $HOME/rpm
%_tmppath $HOME/rpm/tmp
EOF