Results 1 to 3 of 3
Hi,
I have a single perl script that I want to create a rpm for and install on mutliple servers. Now, all the examples I see on how to create ...
- 04-22-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 2
Help in creating a simple rpm
Hi,
I have a single perl script that I want to create a rpm for and install on mutliple servers. Now, all the examples I see on how to create a rpm using rpmbuild, includes building from source a package that follows the normal ../configure, make, make install procedure.
Let's say my script is called myscript.pl and I need it installed in /usr/local/bin. Can someone point to me to what I need copied in which dir (BUILD, SOURCES, etc.) and what the spec file should look like for %prep, %install and %files?
Thanks!
Kosie
- 04-22-2010 #2Just Joined!
- Join Date
- Apr 2010
- Location
- Harare, Zimbabwe
- Posts
- 4
i assume you have rpmbuild environment setup if so put your script in SOURCES folder, and
in your SPECS folder create a file called myscript.spec it should contain the following
Name: myscript
Version: 0.1
Release: 1%{?dist}
Summary: myscript
Group: Applications/System
License: GPLv2
URL: yoursite
Source0: myscript.pl
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl
%description
describe your script here
%prep
#because you have nothing to unpack this remains empty
%build
#because it is not compiled this is also empty
%install
#this is where its done
install -c -m 755 %{SOURCE0} $RPM_BUILD_ROOT/usr/bin/
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
/usr/bin/*
%changelog
* Thu Apr 22 2010 Your Name <youremail>
- describe what was done
then build it
if you want to know more google fedora rpmguide and also gurulabs rpmguide
hope this helps
- 04-22-2010 #3Just Joined!
- Join Date
- Apr 2010
- Location
- Harare, Zimbabwe
- Posts
- 4
sory made a mistake in the %prep section add %setup -c -T otherwise it would just exit with an error


Reply With Quote