Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Programming & Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 17-Aug-2007, 07:22
munna
Guest
 
Posts: n/a
Default

hi all

can you please tell me about spec file
in the spec file how to mention the perticular exe have install in $HOME path..

please help me

thank you in advance
  #2 (permalink)  
Old 17-Aug-2007, 08:50
69_rs_ss
Guest
 
Posts: n/a
Default

Give http://www.google.com/url?sa=t&ct=res&...uaC9lX74jqWta5w a read through and see if it helps.
  #3 (permalink)  
Old 17-Aug-2007, 08:50
ken_yap
Guest
 
Posts: n/a
Default

There used to be an online book called Maximum RPM. It's very out of date, but is still relevant to the point you ask about. There may also be more recent tutorials on the Net.
  #4 (permalink)  
Old 17-Aug-2007, 09:12
linux_learner
Guest
 
Posts: n/a
Default

I still use Maximum RPM. There is also the more current rpm manual at Fedora. http://docs.fedoraproject.org/drafts/rpm-guide-en/
  #5 (permalink)  
Old 18-Aug-2007, 04:52
munna
Guest
 
Posts: n/a
Default

i tried this but it fails
Code:
Summary: GNU munna
Name: munna
Version: Beta
Release: FC7
Source0: %{name}-%{version}.tar.gz
License: GPL
Group**: Utilities/System
URL****: http://munna.com/
Packager: {%Packager}
%description
The GNU indent program reformats C code to any of a variety of
formatting standards, or you can define your own.
%prep
%setup -q
%build
make
%install
%clean
rm -rf %{buildroot}
%files 
$HOME/one/munna
rpmbuild -ba munna-Beta.spec

can you please rewrite this code

please help me

thank you in advance
  #6 (permalink)  
Old 18-Aug-2007, 04:56
ken_yap
Guest
 
Posts: n/a
Default

One normally doesn't put things in $HOME in spec files because RPM packages are meant to install things where everybody can use them. Try /usr/local/bin/munna or something like that. And anyway $HOME is not recognised as a valid path inside a spec file. It would have to be expanded to /home/munna to be legal.
  #7 (permalink)  
Old 18-Aug-2007, 08:49
linux_learner
Guest
 
Posts: n/a
Default

Quote:
One normally doesn't put things in $HOME in spec files because RPM packages are meant to install things where everybody can use them. Try /usr/local/bin/munna or something like that. And anyway $HOME is not recognised as a valid path inside a spec file. It would have to be expanded to /home/munna to be legal.
[/b]

To build packages, you have to build them here /usr/src/packages

/usr/src/packages> ls
BUILD RPMS SOURCES SPECS SRPMS


Your spec files goes.....in SPECS, and the source of your package goes in SOURCES. Still, you are right. Here is a sample spec file I did.

Code:
# Copyright © 2006 suse-linux-support-forum
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments to http://forums.suselinuxsupport.de

%define _suse_ver %(echo "%{suse_version}" | %__sed -e 's/.$//')

Summary: Smart channel defininition for all repositories
Name: smart-channel-all
Version: 0.1
Release: 0.%{_suse_ver}.1
Group: System/Packages
Source0: smart-channel-all.tar.bz2
Packager: Jonathan Rocker
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
URL: http://forums.suselinuxsupport.de
License: GPL
Requires: smart
BuildArch: noarch

%description
Smart channel defininition for all repositories. This is a master list. 

Author: suse-linux-support-forum

%prep
%setup -c "%{name}-%{version}"

%build


%install
%__install -d -m0755 "%{buildroot}%{_sysconfdir}/smart/channels"
%__install -m 0644 *.channel "%{buildroot}%{_sysconfdir}/smart/channels/"

%clean
%__rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/smart/channels/*

%changelog
* Sun Sep 10 2006 - suse-linux-supportforum 0.1
- initial build 0.1
 

Bookmarks

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2