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've been manually applying patches to Wine for use on my own machine, but I want to put it in a PPA for my friends and relations.

Currently I follow this procedure:

  1. Get the latest source from an upstream PPA via apt-get source
  2. Use patch to apply my unofficial, unsupported patches.
  3. Create a package using dpkg-buildpackage -rfakeroot -uc -b

This is fine for creating a package that will run on my local machine. However I now want to distribute this custom build to others via a PPA.

Is this procedure sufficient, or is there a more correct and/or easier to maintain procedure I should be following specifically for Wine?

share|improve this question
    
This answer, to another question, might provide a few useful sources - ubuntu.stackexchange.com/questions/320/… –  andol Jul 30 '10 at 18:10
add comment

6 Answers

up vote 14 down vote accepted
+100

You're pretty close with your example steps, but here's what I'd suggest:

  1. Grab the sources with apt-get source wine and cd into the new directory
  2. Find what sort of patch system the wine package is based on: what-patch; in this case, it tells us we that the wine package uses quilt for patch management
  3. Since we're using quilt, add your custom patch(es) to the quilt series:
    QUILT_PATCHES=debian/patches quilt import <your-patchfile.patch>
    If you have multiple patches, do this for each patch, in the order that you want them applied.
  4. Add a suitable entry to the debian/changelog file - you'll need to alter the version number to ensure that your PPA version is differentiated from the official version. Typically, you should increment the last version number, and add a tilde (~) followed by your custom version string (eg ~jbowtie1). The dch -i command can help with this too.
  5. Build the source package:
    debuild -S
  6. Upload your source package to the PPA build system:
    dput ppa:<your-ppa> ../wine*.changes
    The <your-ppa> parameter is specified on the launchpad page for the PPA you want to upload it to (you'll have to create this beforehand).

It's usually a good idea to do a test build before doing the dput - the pbuilder command allows you to recreate what the PPA build system would do with your package (ie, start from a clean install, add required deps, then build).

In this case you would have to set up pbuilder first (see https://wiki.ubuntu.com/PbuilderHowto), then do this before the dput:

sudo pbuilder build ../*.dsc
share|improve this answer
    
This is about perfect. Is step 3 different if I use edit-patch, or am I better off learning quilt details? –  jbowtie Aug 4 '10 at 9:10
    
If you use edit-patch, you'll have to apply your existing patch as a separate step. But the outcome will be the same, so it's really your call. –  Jeremy Kerr Aug 4 '10 at 9:16
    
Use debuild -S -sa when initially uploading to your PPA. "-sa" will attach the orig source always. –  blueyed Aug 4 '10 at 20:55
add comment

The Ubuntu Packaging Guide has all the information how to package for Ubuntu including howto deal with patches.

share|improve this answer
    
Can you point me to a more specific section of the guide? I can't quite make the conceptual leap from what's in the guide to understanding how wine patches specifically should be packaged. –  jbowtie Jul 30 '10 at 0:30
1  
wine patches are like patches in any other packages. You should you a patch system like quilt to add the patches. This allows you to easily remove them from the packages when the patch has been added upstream. Chapter 4 talks about the different patch systems. –  txwikinger Jul 30 '10 at 14:01
add comment

You need to first build a source package-

https://wiki.ubuntu.com/PackagingGuide/Basic#Building%20the%20Source%20Package

Pushing it to a PPA is very easy for Ubuntu 9.10 or later

Just go to Terminal and type

dput ppa:your-lp-id/ppa <source.changes>
share|improve this answer
add comment

Jeremy's answer is straight to the point.

Alternatively, you can use bzr to handle the source, patches and building/upload.

See https://wiki.ubuntu.com/DistributedDevelopment, starting with https://wiki.ubuntu.com/DistributedDevelopment/Documentation.
While is simplifies some steps, e.g. merging for new upstream versions (if you plan to get ahead of the original Ubuntu package), the original "apt-get source" approach is probably more straight and easier in the end.

share|improve this answer
add comment

Ubuntu Tweak includes a PPA for Wine, once it is selected in Ubuntu Tweak it will stay updated via regular updates

share|improve this answer
    
I know about the Wine PPA, but I want to create my own PPA that includes some custom patches. –  jbowtie Jul 30 '10 at 4:01
add comment

From the winehq website:

Open the Software Sources menu by going to System->Administration->Software Sources. Then select the Third Party Software tab and click Add.

Then, copy and paste the line below.

ppa:ubuntu-wine/ppa

Then run sudo apt-get update and after it's done sudo apt-get install wine

share|improve this answer
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.