Hi,

I could use some assistance building a package. I've been using this guide -
http://www.debian.org/doc/maint-guide/ - and successfully build some
packages for CPAN modules yesterday, which were fairly normal. Now I'm
trying to build a somewhat simpler package but running into two main
problems: getting a cron job set up and actually getting the perl scripts
copied into the right locations.

This package is just a few perl scripts and a perl module. It needs to go
into a certain folder that doesn't exist normally. I added the custom
directory they need to go into (/opt/gsi-tools) to the debian/dirs file and
it is getting created when I install the package. (I know that's kind of a
weird folder but higher powers have insisted that's where this stuff
goes;-))... However the scripts are not getting copied in there. My build
directory is /usr/local/src/gsi-tools/gsi-tools-1.7 and I've tried putting
the scripts right in there, or in
/usr/local/src/gsi-tools/gsi-tools-1.7/opt/gsi-tools
but either way they don't get installed when I install the package.

So I figure I need to add something into the debian/rules file to copy the
files somehow. I've tried several things but the latest thing I tried which
didn't work was:

install: build
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs

        mkdir -p $(CURDIR)/debian/opt/gsi-tools
        cp GSITools.pm $(CURDIR)/debian/opt/gsi-tools/
        cp GSIManagementService.pl $(CURDIR)/debian/opt/gsi-tools


The other part of my question is trying to set up a cron job. I tried adding
the job into debian/cron.d.ex and in the debian/rules file I uncommented
dh_installcron in the "binary-arch: build install" section, but the cron job
is not being added to /etc/crontab or to root's crontab (it needs to run as
root).

I've also tried adding a command into the postinst.ex in the configure
section to echo/append the job to /etc/crontab, and another command in
prerm.ex to remove that line from the crontab.... but even with that the
cron job still never shows up.

Thanks!

Reply via email to