PackageQuickStart
|
Size: 3970
Comment:
|
Size: 3965
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 52: | Line 52: |
| * If you made all the code, you only need one "Files:" line with a "*" (where the "*" means "all files"). You can delete the line with "Files: debian/*" and two lines after it (you're creating the debian/* files now, so you own them just like the rest of the app). | * If you made all the code, you only need one "Files: *" line (where the "*" means "all files"). You can delete the line with "Files: debian/*" and the two lines after it (you're creating the debian/* files now, so you own them just like the rest of the app). |
There are many ways to do packaging for Debian/Ubuntu. This guide provides one simple way to package new applications to meet the ARB guidelines. For more complete details on Debian/Ubuntu packaging, we suggest reading the Ubuntu Packaging Guide. Depending on what kind of app you're submitting, you may also want to read our tips for Makefiles, Python apps, or Unity Lenses.
Create the Package Files
The dh_make utility is a quick way to start up a new package. (If you don't have it installed yet, just run 'sudo apt-get install dh-make'.) Change into the top-level directory for your source code and run dh_make.
- The --native option makes this a simple package (no patches or tarball)
- The --packagename option specifies the package name and version
- The --copyright option specifies the license of your package (gpl2, gpl3, lgpl2, lgpl3, artistic, apache, bsd, or x11)
cd myappdir dh_make --native --packagename=myapp_0.1 --copyright=gpl3
When it asks for the "Type of package", choose "s" for single binary. Review the details, and then <Enter> to confirm.
Running dh_make will create a directory myappdir/debian, with a bunch of packaging files. Most of these files are just templates (named with .ex and .EX), which you won't need, so start by cleaning up unnecessary files with:
cd debian rm *.ex *.EX README* docs
This will leave you with six files in the debian/ directory: changelog, compat, control, copyright, rules, and source/format.
The compat file will contain a single number "8", and doesn't need any changes. The source/format file will contain a simple string "3.0 (native)", and doesn't need any changes. The other files will need some small changes.
changelog file
Edit the changelog file.
- Change the release target from "unstable" to the current Ubuntu release "oneiric".
- Add the ARB version string "-0extras11.10.1" to the package version.
The finished file will look something like:
myapp (0.1-0extras11.10.1) oneiric; urgency=low * Initial Release. -- My Name <myname@example.com> Sun, 01 Apr 2012 13:20:56 -0700
copyright file
Edit the copyright file.
Change the "Format:" line to the current recommended format http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/.
- Change the "Source:" line to link to your source control repository (or delete the line if you don't have one).
- If you made all the code, you only need one "Files: *" line (where the "*" means "all files"). You can delete the line with "Files: debian/*" and the two lines after it (you're creating the debian/* files now, so you own them just like the rest of the app).
- Update the "Copyright:" line to your name, email, and the years the files have existed.
The finished file will look something like:
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: myapp Source: <https://code.launchpad.net/~myname/+junk/extras-myapp-oneiric> Files: * Copyright: 2011-2012 My Name <myemail@example.com> License: GPL-3.0+ License: GPL-3.0+ This program is free software...
control file
rules file
Extra Tips
If dh_make has any trouble figuring out your name or email, set the DEBFULLNAME and DEBEMAIL options:
export DEBFULLNAME="My Name" export DEBEMAIL=myname@example.com
For licenses other than gpl2, gpl3, lgpl2, lgpl3, artistic, apache, bsd, or x11, skip the --copyright option when running dh_make, and manually edit the license in the debian/copyright file. You can use any license Identifier from the SPDX license list.
AppReviewBoard/Submissions/PackageQuickStart (last edited 2012-07-30 15:26:04 by 71-212-50-192)