Fedora Linux Support Community & Resources Center
  #1  
Old 6th July 2008, 05:39 PM
den23513 Offline
Registered User
 
Join Date: Mar 2008
Age: 38
Posts: 69
Create own rpm - need help with spec file

Hello!
I want to create rpm file for binary package already installed in my system.
Usually i using this syntax for my spec files:
Quote:
Name: digger
Version: 0.1
Release: 1%{?dist}
Summary: Digger
Group: Games
License: GPL
Requires: SDL

%description
Very old PC game.

%files

%defattr(-,root,root)

%attr(0755,root,root) /usr/bin/digger
%attr(0644,root,root) /usr/share/icons/digger/digger.png
%attr(0644,root,root) /usr/share/icons/digger/large/digger.png
%attr(0644,root,root) /usr/share/icons/digger/mini/digger.png
%attr(0644,root,root) /usr/share/applications/digger.desktop
and then: rpmbuild -bb -v digger.spec

This is good for 5 binary files that includes in this package.
But the problem is if i have more than 200 files and every file have its own permissions.

What i need to write in my spec file?
Example: my package installed in /opt/package
If i try this syntax( %attr(,root,root) /opt/package/*), i get error.

I can write script to make list of files with permissions, but maybe present some better way to do this?

Sorry about my English.
Reply With Quote
  #2  
Old 6th July 2008, 06:12 PM
brebs Offline
Banned
 
Join Date: Apr 2008
Posts: 558
Use e.g.:
Code:
%files
%defattr(-,root,root,-)
/opt/%{name}
Reply With Quote
  #3  
Old 6th July 2008, 08:25 PM
den23513 Offline
Registered User
 
Join Date: Mar 2008
Age: 38
Posts: 69
Thanks! it working.
Reply With Quote
Reply

Tags
create, file, rpm, spec

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need help with my FCEUX spec file uncholowapo Gamers' Lounge 4 26th December 2008 05:06 PM
Can someone check my spec file? uncholowapo Gamers' Lounge 2 15th October 2008 11:22 PM
building a SPEC file jim Programming & Packaging 5 2nd October 2005 09:40 PM
About the spec file in emacs-21.4-2.src.rpm AlaxMAX Using Fedora 2 19th April 2005 08:41 AM


Current GMT-time: 10:32 (Sunday, 31-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat