Re: custom RPM build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Leigh Peterson wrote:
Hi All,
I'm currently trying to create an RPM which contains the NRPE service as well as some custom scripts. The problem I'm having is that the source for the plugins and NRPE are in seperate tar.gz files. The spec file I have at the moment allows me to build the NRPE executable and start-up scripts, etc, and create an RPM. I would like to include some extra plugins from the other tar.gz file. These plugins are all perl scripts, so they don't require compilation, just a straight copy into the plugins folder before the RPM is created.

First, add the plug-ins tarball as another source file; for example:

   Source: nrpe-source-tarball.tar.gz
   Source1: plugins.tar.gz

Next, modify the %prep section to unpack the the extra plug-ins tarball:

   %prep
   %setup
   %setup -T -D -a 1

The second %setup directive will unpack the plug-ins tarball in the
top-level source directory of NRPE.

Finally, add commands in the %install section to copy the plug-ins into
the install destination:

   %install
   # install NRPE
   rm -fr $RPM_BUILD_ROOT
   make install DESTDIR=$RPM_BUILD_ROOT
   # install plug-ins unpacked in top-level source directory
   cp other-plugins/*.pl $RPM_BUILD_ROOT/usr/lib/nrpe/plugins

Make sure to add the plug-in scripts to the %files section so they'll be
included in the package.

HTH,

-- D.

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux