Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a GTK3 and a Gnome Shell theme. I haven't created a deb file yet...

Can i please know how to create a deb file and upload it to the launchpad? Is there any good guides?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

Packaging a theme isn't much different than any other kind of packaging. There are a number of other questions under the tag that might help you out. There are also a number of links to tutorials on the tag wiki. The way that I learned packaging, and that I like to suggest to others, is to simply look at packages like yours. apt-get source something similar and learn by example.

Though, let me start you off in the right direction. (This answer is very similar to my answer about packaging python scripts.)

Here's your basic source package layout:

my-theme/
    -- my-theme/
    -- debian/
        -- changelog
        -- copyright
        -- compat
        -- rules
        -- control
        -- install

Run dch --create in the directory to create a properly formatted debian/changelog entry.

debian/copyright should look like:

Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174
Upstream-Name: myScript
Upstream-Contact: Name, <email@address>

Files: *
Copyright: 2011, Name, <email@address>
License: (GPL-2+ | LGPL-2 | GPL-3 | whatever)
 Full text of licence.
 .
 Unless there is a it can be found in /usr/share/common-licenses

debian/compat can just be: 7

debian/rules:

#!/usr/bin/make -f

%:
    dh $@

debian/control:

Source: my-theme
Section: gnome
Priority: optional
Maintainer: Name, <email@address>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.9.2
Homepage: http:///www.example.com


Package: my-theme
Architecture: all
Depends: ${misc:Depends}
Description: short description
 A long description goes here.
 .
 It can contain multiple paragraphss

If you need a specific theme engine for your theme, make sure that you put that on the Depends line as well.

debian/install:

my-theme usr/share/themes

Now build it with debuild --no-tgz-check

This will create a functional deb package. Lintian is going to throw a few warnings regarding the lack of an orig.tar.gz, but unless you plan on creating a proper upstream project that makes tarball releases you'll probably just want to ignore that for now.

If you want to put different variations into separate deb packages, take a look at: How to have Debian packaging generate two packages given an upstream source archive?

How to upload to a PPA is covered in more detail on Launchpad, but essentially what you need to do is upload the files with: dput ppa:your-lp-id/ppa /path/to/your/source.changes

If you haven't created you PPA yet, that is covered here.

share|improve this answer
    
Thanks a lot my friend! –  EApubs Feb 29 '12 at 14:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.