Packaging shell scripts

Asked by David D Short

I have successfully packaged some source code in such a way that Launchpad accepts it for inclusion in my PPA, can compile it, and make a .deb available. Yay!

The next step that I want to make is packaging a complicated shell script. I have managed to make a .deb of it on my own machine, including a man page etc, but since it doesn't have the usual "Makefile", "configure" etc, it is not accepted into my PPA.

Could someone please explain what tricks I need to use to get a shell script accepted?

It might be helpful to imagine that we have a script called "clear-ls.sh" that contains nothing but the following:

#!/bin/bash
clear
ls

What would I have do to make Launchpad accept it?

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Celso Providelo (cprov) said :
#1
Revision history for this message
David D Short (chameleondave) said :
#2

Thanks. That guide provides a few more details about packaging that I didn't have from other guides, but it still doesn't address what I am trying to do. It is all about turning source code into packages.

I've already successfully turned (other people's) source code into packages. I don't know how to write and prepare (my own) source code in order for it to then be packaged. Or, to be more precise, I know enough to make "dpkg -b" produce a .deb, but not enough to make a PPA compilation work.

Even the supposedly simple example package (hello-debhelper-2.2) mentioned in the guide is actually very complex, written in C, with a long changelog, a long configure file, etc.

One day, I will learn C, and learn how to make "Makefile" and "configure" files that prepare the source for compilation. But not today.

What would the PPA system (soyuz?) need to make it put "clear-ls.sh" in "/usr/bin"?

Revision history for this message
Celso Providelo (cprov) said :
#3

Hi David,

The manual I have pointed you *does* address everything you need to know for packaging simple and complex for ubuntu/debian systems, you just have to *read* it.

'Reference packages' (https://wiki.ubuntu.com/PackagingGuide/Complete#head-be3dbf73fd08421ef7560f75f6c38c9b9b41de82) lists "ubuntu-artwork" and "example-content" source packages that does exactly what you want. Did you take a look at them ?

Finally, the soyuz upload system supports all packages currently available in ubuntu (i.e. properly constructed source debs) and failures while processing a package will be replied back to uploader in a very objective way. If you need help solving those issues you have to actually mention them.

Revision history for this message
Celso Providelo (cprov) said :
#4

I'm marking this question as solved because the packaging-guide reference is posted and the issue is clearly not related (yet) with Soyuz/Launchpad.

Revision history for this message
David Henningsson (diwic) said :
#5

I believe this HOW-TO is what you are looking for:

http://ubuntuforums.org/showthread.php?p=5862233

Also see the section about dh_make a bit down in the thread.