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

Re: script-with-language-extension

On Sun, 09 Mar 2014 21:39:01 +0000, Dave Walker wrote:

> > Net::Frame::Device includes two scripts that are installed to /usr/bin,
> > but both have .pl extensions therefore giving me a Lintian warning.
> >
> > My initial thought on fixing this is to rename the files by overriding
> > dh_auto_install in debian/rules... but I'm struggling to find out how to
> > do this without explicitly writing the file names, which wouldn't
> > accommodate new files in future releases.
> >
> > So far I've got the following:
> >
> >         PACKAGE = $(shell dh_listpackages)
> >         TMP     = $(CURDIR)/debian/$(PACKAGE)
> >
> >         <SNIP>
> >         find $(TMP)/usr/bin -name '*.pl'
> >
> How about:
> find $(TMP)/usr/bin -name "*.pl" -exec rename 's/\.pl$//' {} +
> Just make sure you do it at build time, not install time.

Looks good, and similar to existing examples which might be a bit simpler:

libdata-stag-perl/debian/rules: prename 's/\.pl//' $(TMP)/usr/bin/*
libdata-stag-perl/debian/rules: prename 's/\.pl//' $(TMP)/usr/share/man/man1/*1p*
libdbix-dbstag-perl/debian/rules:   rename 's/\.pl//' debian/libdbix-dbstag-perl/usr/share/man/man1/*.pl.1p
libdbix-dbstag-perl/debian/rules:   rename 's/\.pl//' debian/libdbix-dbstag-perl/usr/bin/*.pl
libembperl-perl/debian/rules:   rename -v 's/\.pl//' $(TMP)/usr/bin/emb*
libembperl-perl/debian/rules:   rename -v 's/\.pl//' $(TMP)/usr/share/man/man1/emb*
libgeo-osm-tiles-perl/debian/rules: prename 's/\.pl$$//'        $(TMP)/usr/bin/downloadosmtiles.pl
libgeo-osm-tiles-perl/debian/rules: prename 's/\.pl\.1p$$/.1p/' $(TMP)/usr/share/man/man1/downloadosmtiles.pl.1p
libtext-ngrams-perl/debian/rules:   rename -v 's/\.pl//' $(TMP)/usr/bin/*.pl
libtext-ngrams-perl/debian/rules:   rename -v 's/\.pl//' $(TMP)/usr/share/man/man1/*
libvm-ec2-perl/debian/rules:    rename 's/\.pl//' $(TMP)/usr/bin/*.pl
libvm-ec2-perl/debian/rules:    rename 's/\.pl//' $(TMP)/usr/share/man/man1/*


 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Aerzte: Männer sind Schweine

Attachment: signature.asc
Description: Digital Signature

Reply to: