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

Re: [MoM] ProbABEL packaging



Hi Andreas,

On 16-12-13 09:31, Andreas Tille wrote:
> Hi Lennart,
> 
> 
>> What would be the best way to start a probabel-examples package? Simply
>> start from scratch and make sure that I only install the examples? Or is
>> there a 'magic' way to do this in the present directory structure?
> 
> It is actually no magic but quite simple to create more than one binary
> package from one source package.  As I said it might be a good idea to
> have a look into similar packages and while people currently tend to Git
> our SVN repository has a great advantage since it stores *all* packages
> stuff and thus is very simple to browse for examles.  If you check out
> 
>     svn checkout svn://svn.debian.org/svn/debian-med
> 
> you can cd into it and do:
> 
> $ grep "^Package: .*-examples" trunk/packages/*/trunk/debian/control
> trunk/packages/activiz.net/trunk/debian/control:Package: activiz.net-examples
> trunk/packages/altree/trunk/debian/control:Package: altree-examples
> trunk/packages/beast-mcmc/trunk/debian/control:Package: beast-mcmc-examples
> trunk/packages/blimps/trunk/debian/control:Package: blimps-examples
> trunk/packages/bowtie/trunk/debian/control:Package: bowtie-examples
> trunk/packages/cain/trunk/debian/control:Package: cain-examples
> trunk/packages/gdpc/trunk/debian/control:Package: gdpc-examples
> trunk/packages/igstk/trunk/debian/control:Package: igstk-examples
> trunk/packages/insighttoolkit/trunk/debian/control:Package: insighttoolkit4-examples
> trunk/packages/invesalius/trunk/debian/control:Package: invesalius-examples
> trunk/packages/libsbml/trunk/debian/control:Package: libsbml5-examples
> trunk/packages/ltrsift/trunk/debian/control:Package: ltrsift-examples
> trunk/packages/meme/trunk/debian/control:Package: meme-examples
> trunk/packages/mira/trunk/debian/control:Package: mira-examples
> trunk/packages/ssake/trunk/debian/control:Package: ssake-examples
> trunk/packages/t-coffee/trunk/debian/control:Package: t-coffee-examples
> 
> Now you can do a random pick from what package you might steal+adapt the
> code you need (for instance the last one is a simple example).  It is
> basically an additional paragraph in the debian/control file - which was
> the base of my grep query.  The installation of the files is done by
> moving the files into a different subdirectory of debian/ dir.  I'd
> recommend something like
> 
> DEBEXAMPLES:=$(DEBPKGNAME)-examples
> 
> in the beginning of your rules file and than moving the files around.
> 
> If you want to check the more general packaging docs the keyword is
> probably "multi binary packages" (or something like this - I did not
> checked).


Thanks for these hints. In took me a wile to figure it out, but it
turned out to be simple. The main missing piece of information was the
when building multiple binary packages the files get installed in d/tmp
instead of d/$DEBPKGNAME and then copied during the dh_install phase.
In short and for future reference, this is what I did:
- Add a section to d/control
- Create d/$DEBPKGNAME.install listing the directories (from d/tmp) that
need to go in the main (arch-dependent) package
- Create d/$DEBPKGNAME-examples.install listing the directories (from
d/tmp) that need to go in the examples package.
- Update d/rules; previously my changes were in the
override_dh_auto_install section, now they're in the override_dh_install
section (changing the path to $DEBPKGNAME-examples where needed)

I would have been cool if dh_install, in the case of multiple binary
packages, would move the files from d/tmp to d/$DEBPKGNAME (etc.) so you
can more easily see if you indeed listed everything in the .install
files. Do you know if such an option exists?


I think with this we are ready for upload, right? Maybe a final change
in d/changelog to replace the UNRELEASED tag?


Best,

Lennart.

> 
> Just let me know if you need further hints or a kick start I could
> inject right into Git.
> 
> Kind regards
> 
>         Andreas.
> 

-- 
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands

lennart@karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: