![]() |
Packaging Help for a Newbie Required...
I've been trying to get an application of mine (Quick Clip, simple Python application) packaged up using my Linux desktop, and I need a bit of help.
WARNING: I'm a complete packaging newbie. From the information I gathered from the Maemo Diablo Reference Manual, I created a folder named quickclip-0.12.0. In it is this: Code:
When I run dpkg-buildpackage -rfakeroot from the scratchbox x86 prompt inside my quickclip-0.12.0 directory, I get this: Code:
dpkg-buildpackage: source package is quickclip Any help would be greatly appreciated, even if is just a link to some documentation. Thanks. |
Re: Packaging Help for a Newbie Required...
dh_make assumes you're using a Makefile but as this is a raw python app, I presume you aren't. An easy way to get started is to comment the make lines, and make an file called 'install' in debian/
This file works like this: file destination entire_contents_of_ folder destination So, if you want to install the file "gobbled" which is in the same folder as where the debian folder is to /usr/bin, you'd write in your install file: gobbled /usr/bin If you want to install the files in the folder "gobbled_res" (which is in the same location as debian/ is) to /usr/share/gobbled, you'd write: gobbled_res/ /usr/share/gobbled Then uncomment dh_install from your rules. dh_install handles creating dirs automatically. That is just one way, have fun in finding more! :) Good luck :) |
Re: Packaging Help for a Newbie Required...
If you have a setup.py file you can add a Makefile with the following in it.
all: python2.5 setup.py build clean: python2.5 setup.py clean --all install: python2.5 setup.py install --root $(DESTDIR) |
Re: Packaging Help for a Newbie Required...
Thanks for the help qwerty & michaelnt. I do not have a setup.py file, so I'm trying qwerty's method, but I've run into a problem:
I commented out all of the $(MAKE) lines out of rules; I assume that is the correct thing to comment out. Then I created a install file with this: Code:
etc/ / Code:
[sbox-DIABLO_X86: ~/quickclip-0.12.0] > dpkg-buildpackage -rfakeroot |
Re: Packaging Help for a Newbie Required...
Run dh_make from scratchbox, not Ubuntu.
|
Re: Packaging Help for a Newbie Required...
Forget that last post; I changed debian/compat from 7 to 5, and I got past that error (but on to another one). I'm working it..
|
Re: Packaging Help for a Newbie Required...
Quote:
|
Re: Packaging Help for a Newbie Required...
Ok, one last problem, when running dpkg-buildpackage -rfakeroot, I get this at the end:
Code:
dpkg-source: unrepresentable changes to source This website seems to think it has something to do with the clean process. Any ideas? Thanks :o :o |
Re: Packaging Help for a Newbie Required...
Not sure about your error.. but you can clean that up a little and rm -f *.ex *.EX in that debian folder. Those are example files made by the helper package in case you wanted to include something similar.. but are not required and are just bloat.
Have you tried just running: Quote:
Just a thought, from here. ETA: I think part of the problem here is you are trying to follow the steps to building a debian package, from a source based package. Those steps automagically build the directory structure and everything for you, then compiled the binaries, then build the package, then lintian it. You have done half of that yourself.. so you're starting from the middle but running the commands meant for the beginning. All you have to do is package the directory and control files you already made (with the command above, or using "fakeroot dpkg-deb --build ...") and then running lintian against it manually will tell you if anything is missing or broken. I'm no expert at packaging.. this is all what I learned when I was messing with my own repo for Deblet. |
Re: Packaging Help for a Newbie Required...
Quote:
|
Re: Packaging Help for a Newbie Required...
My first concern about the link you posted is what it says at the top;
"Warning: This article is out of date and should not be used for creating new packages." It then goes on to point to the Debian New Maintainer's guide, which is the canonical, in fact the only reliable, guide to packaging debs. Do begin here since Maemo relies on debs being built first, then modifying the deb slightly to fit maemo. If you are still getting errors, you can mail me at jeremiah@maemo.org and I'll see if I can help. One of my goals is to create a python packaging howto so maybe we can work on that. :^) Regards, Jeremiah |
Re: Packaging Help for a Newbie Required...
Only thing I don't like about the New Maintainers Guide, from what I've read, is it pretty much assumes you're dealing with a source package (.tar.gz) to be used with automake...
In this case of Python/perl things.. there is no source package. The source IS the binaries. All you need to do is make your structure, create a control/copywrite/changelog file, and make the package. Seems it would be a bit easier than the dh_make method of doing things.. |
Re: Packaging Help for a Newbie Required...
Hello Jeremiah, welcome to the community :-)
Quote:
The main reason I picked the Python language to use for my program is that it's easy to use. And so far packaging via Pypackager was easy, too. But now that I want to get this thing uploaded to Extras, it has become a major hassle. Quote:
|
Re: Packaging Help for a Newbie Required...
Quote:
|
Re: Packaging Help for a Newbie Required...
For icons there might be a command you need to run to update the icon cache...
gtk-update-icon-cache I think??? If that works.. what you'll want to do is include a postinst script in your debian package that runs that command. The postinst will execute, as it's name implies, after the installation of the package automatically. Or.. might be something as simple as making sure your path is the correct path to the system icon files? |
Re: Packaging Help for a Newbie Required...
Quote:
Code:
openssl base64 -in quick_clip.png -out quick_clip.txt |
Re: Packaging Help for a Newbie Required...
Ah.. well that's a little beyond me. I have no idea :). Never done icons for App Manager.
|
Re: Packaging Help for a Newbie Required...
I know that Khertan's PyPackager does the icon conversion; perhaps you can peek into his code to see how he does it?
Oh, and while you're there, are you interested in updating it? I've got a few feature requests... |
Re: Packaging Help for a Newbie Required...
Quote:
|
Re: Packaging Help for a Newbie Required...
Quote:
|
Re: Packaging Help for a Newbie Required...
Quote:
The problem may just be in the way you're adding the base64 into the control file. I do this: Quote:
<space>base64 contents") |
Re: Packaging Help for a Newbie Required...
Quote:
Code:
Source: quickclip |
Re: Packaging Help for a Newbie Required...
Quote:
Quote:
|
Re: Packaging Help for a Newbie Required...
Ah, ha! The pypackager built deb has a "Maemo-Icon-26" field not a "XB-Maemo-Icon-26" field...hmm. I guess I'll try that...
|
Re: Packaging Help for a Newbie Required...
Yes, the "Maemo-Icon-26" worked. The icon now appears fine. I just wonder why XB- didn't? Strange.
|
Re: Packaging Help for a Newbie Required...
If you have to use Maemo-Icon-26 w/out the XB-, you're not making a package that the autobuilder will accept.
|
Re: Packaging Help for a Newbie Required...
Quote:
|
Re: Packaging Help for a Newbie Required...
Are you building the package with dpkg-buildpackage?
Non-related suggestions: use "Architecture: all" since this is pure python application with "XB-Maemo-Display-Name:" field you can get better formatted title, for example "XB-Maemo-Display-Name: Quickclip" |
Re: Packaging Help for a Newbie Required...
Quote:
|
Re: Packaging Help for a Newbie Required...
yes, you should be using dpkg-buildpackage to build .debs, it might have something to do with missing icon.
I believe qwerty12 explained how to fix the problem with dpkg-buildpackage. If those instructions are not helping, I have to ask you to post the error message and maybe the whole source package here. Otherwise we are, again, just guessing :) |
Re: Packaging Help for a Newbie Required...
Thats just it.... dpkg-buildpackage is for source packages...
he's not building from a source .... No automake, no configure, no make. Just Binaries. |
Re: Packaging Help for a Newbie Required...
It's still source package even if it contains only python files.
|
Re: Packaging Help for a Newbie Required...
Odd. Seems when I was trying it I had similar issues.. that buildpackage always wanted to run the makes and compile.. then whined when they weren't there.
ETA: Also.. as long as the package passes Lintian checks.. why would it matter which way it was made a .deb? The format is the same.. |
Re: Packaging Help for a Newbie Required...
buildpackage does what debian/rules says is it to do + it generates diff.gz where BrentDC is caught (+ some other things)
|
Re: Packaging Help for a Newbie Required...
So essentially you need to modify the rules and remove all the dh_make, dh_* entries, and anything else in there that causes problems.
I see. Thanks. |
Re: Packaging Help for a Newbie Required...
Quote:
Code:
dh_install: quickclip missing files (), aborting I think I'm really close. Thanks. |
Re: Packaging Help for a Newbie Required...
Quote:
For a source package, all you have to do is create a directory to hold your script, then you can use tar and gzip to create a tarball. Add a Makefile and you are ready to go! |
Re: Packaging Help for a Newbie Required...
Quote:
|
Re: Packaging Help for a Newbie Required...
Quote:
|
Re: Packaging Help for a Newbie Required...
Quote:
|
All times are GMT. The time now is 15:53. |
vBulletin® Version 3.8.8