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

Re: Packaging guide Objective-C SWARM at Ubuntu and Debian



On Thu, Apr 22, 2010 at 5:00 PM, Andreas Tille <andreas@an3as.eu> wrote:
> when reinspecting the free software projects which might be interesting
> to be packaged as official Debian package for the profit of the Debian
> Med project I tried to find out the status of Swarm.  At the Swarm
> homepage I found a hint to your packaging guide which vanished from the
> original location but the web never forgets and thus I found the content
> at
>
>   http://web.archive.org/web/20071225020842/http://jalvesaq.googlepages.com/swarm.html
>
> It seems you just prepared packaging stuff for swarm but all the
> interesting pieces of your work (*.dsc, *.diff.gz) seem to have vanished
> and you probably lost interest in continuing your work.  I would kindly
> like to ask you whether you see a chance to provide these files somehow
> for a limited time period.  If you might do us this favour I would like
> to commit the packaging pieces into our Debian Med SVN to enable other
> people to start at some point rather than from scratch.

Unfortunately, I don't have backup of my swarm package. I looked at
old DVDs but I didn't include the libswarm in them. I'm attaching a
commented version of the debian/rules that I have sent by email to
Paul Jonhson who was wanting to make a Debian package of swarm, and,
below, are some pieces of the email that I have written to him at the
time. I'm sorry, but that's all that I have.

Best regards,

Jakson

------------------------------------------
The old email:

Swarm is considerably difficult to package. Before being able to create
the swarm package I have built some simpler packages for myself of
applications that aren't in Debian repositories.

It's really very frustrating to create an empty package. My first (and
only) attempt of creating a library package was with Swarm, and it
happened exactly as you describe. Unfortunately, I don't remember how
I solved the problem. I guess that the solution is in the "make
install". My "make install" defines the variable DESTDIR:

$(MAKE) DESTDIR=$(CURDIR)/debian/libswarm install

If the addition of DESTDIR does not solve the problem perhaps there is
something wrong with the "control" file.

It would be simpler to you to get my package, overwrite my name in the
files at the debian directory, and, then, begin making changes. I put
two of the three files that make a Debian source package on the web in
case you choose to follow this route:

http://jalvesaq.googlepages.com/swarm_2.2.4-1.diff.gz
http://jalvesaq.googlepages.com/swarm_2.2.4-1.dsc

If you save them at the same place where swarm_2.2.4.orig.tar.gz is,
just do:

dpkg-source -x swarm_2.2.4-1.dsc

Just remembering, swarm_2.2.4.orig.tar.gz is just a copy of
swarm-2.2.4.tar.gz, and you have to delete swarm-2.2.4 directory before
issuing the command dpkg-source.

Anyway, if new problems appear when you is changing the package, you
can send the gzipped diretory to me and I will try to help you. If
you want to add java support, Pavel Vinogradov's "Introduction to Java
Swarm for ABM" might be helpful:

http://blog.nixdev.net/2008/03/29/introduction-java-swarm-abm/

You might also want to put Makefile.appl back to /usr/etc, and ignore
lintian warnings.

As soon as you release the package I will put a note in my website that
up to date packages can be found in your homepage.


> It seems to me a
> HUGE flaw in the Debian approach that the user is allowed to fiddle
> around in the source code while making the package. I keep having to
> delete the working directory, untar fresh source, and re-run dh_make
> ...

It's my fault! Debian recommends the use of dpatch. All
changes to the source code should be in debian/patches and no
change should be outside debian directory. The problem is that I was
lazy and followed the easiest path, changing the code directly. Latter,
I didn't feel the need to learn how to use dpatch. But as you can see
in the swarm_2.2.3-1.diff.gz I have made very few changes outside debian
directory. Most changes were made by the autoconf/automake tools.

I also had the need to delete the working directory. Again, I don't
remember how I have solved it. I think it was related with the fact that
swarm doesn't distclean properly. Some files created by "configure" &&
"make" aren't deleted by "make distclean".

> I can't figure out how to build Swarm in a separate directory.  Have
> you?  Building inside the source tree makes a mess. I'd like to do
> something like

Probably using the DESTDIR variable at the rules file (in the "make
install" command).

> cd swarm-2.2.4
> mkdir builddir
> cd builddir
> ../configure --prefix=/usr ....
> make
> make install
>
> but in the Debian approach, there appears to be no method to do that.

The Debian approach it to put the command in the debian/rules file.

The builddirs are debian/libswarm debian/libswarm-dev and
debian/libswarm-dbg, but they are created automatically. Instead of
"configure, make, make install", we use dpkg-buildpackage.

"make install" might not be enough for all packages because the Debian
maintainer might want to change the directories where something is
installed, install additional stuff (like man pages), etc. The
additional procedures go to debian/rules. If the upstream package
already follows all Debian "laws", the debian/rules will have just the
plain "configure", "make", and "make install".

Attachment: rules_commented
Description: Binary data


Reply to: