Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Need help with RPM spec file
New Posts  All Forums:Forum Nav:

Need help with RPM spec file

post #1 of 3
Thread Starter 
I'm making my own packages for my newly made lfs system with rpm5, but i'm having a little trouble with rpm spec files, namely the %files section. In the spec files i've seen as examples in documentation they seem to do the same thing as this...im not sure whats wrong...maybe my .rpmmacros needs a tweak?

Heres my spec file:
Code:
Summary: Download utility
Name: wget
Version: 1.11
Release: 4
Copyright: idk
Group: Applications/Internet
Source: wget-1.11.4.tar.gz
BuildRoot: /var/tmp/wget-1.11-4-buildroot

%description
The wget command can be used to download files off the internet.

%prep
%setup -n wget-1.11.4

%build
./configure --prefix=/usr --sysconfdir=/etc &&
make

%install
make install

%clean
rm -rf $RPM_BUILD_ROOT

%files 
%defattr(-,-,-)
/usr/share/man/man1/wget.1
/usr/bin/wget
/usr/share/info/wget.info
/usr/share/gettext/po/Makefile.in.in
/usr/share/locale/ga/LC_MESSAGES/wget.mo
/usr/share/locale/{be,bg,ca,cs,da,de,el,en_GB,eo,es,et,eu,fi,fr,ga,gl,he,hr,hu,id,it,ja,nb,nl,pl,pt,pt_BR,ro,ru,sk,sl,sr,sv,tr,uk,vi,zh_CN,zh_TW}/LC_MESSAGES/wget.mo
/etc/wgetrc
And here are the errors i get:
Code:
Processing files: wget-1.11-4.x86_64
error: File not found: /root/rpm/tmp/wget-root/usr/share/man/man1/wget.1
error: File not found: /root/rpm/tmp/wget-root/usr/bin/wget
error: File not found: /root/rpm/tmp/wget-root/usr/share/info/wget.info
error: File not found: /root/rpm/tmp/wget-root/usr/share/gettext/po/Makefile.in.in
error: File not found: /root/rpm/tmp/wget-root/usr/share/locale/ga/LC_MESSAGES/wget.mo
error: File not found: /root/rpm/tmp/wget-root/usr/share/locale/{be,bg,ca,cs,da,de,el,en_GB,eo,es,et,eu,fi,fr,ga,gl,he,hr,hu,id,it,ja,nb,nl,pl,pt,pt_BR,ro,ru,sk,sl,sr,sv,tr,uk,vi,zh_CN,zh_TW}/LC_MESSAGES/wget.mo
error: File not found: /root/rpm/tmp/wget-root/etc/wgetrc
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpm/tmp/wget-root


RPM build errors:
    File not found: /root/rpm/tmp/wget-root/usr/share/man/man1/wget.1
    File not found: /root/rpm/tmp/wget-root/usr/bin/wget
    File not found: /root/rpm/tmp/wget-root/usr/share/info/wget.info
    File not found: /root/rpm/tmp/wget-root/usr/share/gettext/po/Makefile.in.in
    File not found: /root/rpm/tmp/wget-root/usr/share/locale/ga/LC_MESSAGES/wget.mo
    File not found: /root/rpm/tmp/wget-root/usr/share/locale/{be,bg,ca,cs,da,de,el,en_GB,eo,es,et,eu,fi,fr,ga,gl,he,hr,hu,id,it,ja,nb,nl,pl,pt,pt_BR,ro,ru,sk,sl,sr,sv,tr,uk,vi,zh_CN,zh_TW}/LC_MESSAGES/wget.mo
    File not found: /root/rpm/tmp/wget-root/etc/wgetrc
WC ftw!
(13 items)
 
  
CPUMotherboardGraphicsRAM
C2D E7200 @ 3.51ghz 1.17v Lapped Gigabyte EP35-DS3L, HR-05 on nb Palit 8800gt 8gb G.Skill @ 1000mhz 2.1v 
Hard DriveOptical DriveOSMonitor
2x7200.12 500gb RAID, 2xWD5000AAKS Asus DRW-1814BLT SATA CLFSx64, W7x64 SCEPTRE 22" 1680x1050 
KeyboardPowerCaseMouse
Logitech Media Corsair HX520 Modular Antec P182 Gunmetal Logitech G7 Laser Cordless 
Mouse Pad
none 
  hide details  
Reply
WC ftw!
(13 items)
 
  
CPUMotherboardGraphicsRAM
C2D E7200 @ 3.51ghz 1.17v Lapped Gigabyte EP35-DS3L, HR-05 on nb Palit 8800gt 8gb G.Skill @ 1000mhz 2.1v 
Hard DriveOptical DriveOSMonitor
2x7200.12 500gb RAID, 2xWD5000AAKS Asus DRW-1814BLT SATA CLFSx64, W7x64 SCEPTRE 22" 1680x1050 
KeyboardPowerCaseMouse
Logitech Media Corsair HX520 Modular Antec P182 Gunmetal Logitech G7 Laser Cordless 
Mouse Pad
none 
  hide details  
Reply
post #2 of 3
All of my RPM spec files use %configure (a macro) to get the paths right, e.g.:

Code:
%build
%configure #--any-weird-options
make
Then for install I have:

Code:
%install
make DESTDIR=$RPM_BUILD_ROOT install
This is probably done in different ways for different packages but this ought to get you started.

EDIT: Congrats for coming up with a question that perhaps one person on here knows what you're talking about.
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
post #3 of 3
Thread Starter 
Quote:
Originally Posted by error10 View Post
All of my RPM spec files use %configure (a macro) to get the paths right, e.g.:

Code:
%build
%configure #--any-weird-options
make
Then for install I have:

Code:
%install
make DESTDIR=$RPM_BUILD_ROOT install
This is probably done in different ways for different packages but this ought to get you started.

EDIT: Congrats for coming up with a question that perhaps one person on here knows what you're talking about.
hehe..well the DESTDIR= was just what I needed. I set it to DESTDIR=%{buildroot} and then in the file section it was easiest to just put "/" which puts all files created in the build directory in the binaries.

Silly me I thought rpm took the files from the system, not the buildroot.

Well now it should be alot smoother making packages from here on out.

+1
WC ftw!
(13 items)
 
  
CPUMotherboardGraphicsRAM
C2D E7200 @ 3.51ghz 1.17v Lapped Gigabyte EP35-DS3L, HR-05 on nb Palit 8800gt 8gb G.Skill @ 1000mhz 2.1v 
Hard DriveOptical DriveOSMonitor
2x7200.12 500gb RAID, 2xWD5000AAKS Asus DRW-1814BLT SATA CLFSx64, W7x64 SCEPTRE 22" 1680x1050 
KeyboardPowerCaseMouse
Logitech Media Corsair HX520 Modular Antec P182 Gunmetal Logitech G7 Laser Cordless 
Mouse Pad
none 
  hide details  
Reply
WC ftw!
(13 items)
 
  
CPUMotherboardGraphicsRAM
C2D E7200 @ 3.51ghz 1.17v Lapped Gigabyte EP35-DS3L, HR-05 on nb Palit 8800gt 8gb G.Skill @ 1000mhz 2.1v 
Hard DriveOptical DriveOSMonitor
2x7200.12 500gb RAID, 2xWD5000AAKS Asus DRW-1814BLT SATA CLFSx64, W7x64 SCEPTRE 22" 1680x1050 
KeyboardPowerCaseMouse
Logitech Media Corsair HX520 Modular Antec P182 Gunmetal Logitech G7 Laser Cordless 
Mouse Pad
none 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Need help with RPM spec file