Active Topics

 


Reply
Thread Tools
BrentDC's Avatar
Posts: 903 | Thanked: 632 times | Joined on Apr 2008
#1
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:
debian/
  changelog                                                                                              
  compat                                                                                                 
  control                                                                                                
  control~                                                                                               
  copyright
  cron.d.ex
  dirs
  docs
  emacsen-install.ex
  emacsen-remove.ex
  emacsen-startup.ex
  init.d.ex
  init.d.lsb.ex
  manpage.1.ex
  manpage.sgml.ex
  manpage.xml.ex
  menu.ex
  postinst.ex
  postrm.ex
  preinst.ex
  prerm.ex
  quickclip.default.ex
  quickclip.doc-base.EX
  rules
  watch.ex
etc/
home/
usr/
All the stuff in debian/ was created with dh_make (just from the normal Ubuntu shell prompt, not scratchbox...). The other folders are the proper directory tree of what I want installed. Don't know if this is the correct way to do this...

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                                  
dpkg-buildpackage: source version is 0.12.0-1                                   
dpkg-buildpackage: source changed by brent User <bchiodo@gmail.com>             
dpkg-buildpackage: host architecture i386                                       
dpkg-buildpackage: source version without epoch 0.12.0-1                        
: Using Scratchbox tools to satisfy builddeps                                   
 fakeroot debian/rules clean                                                    
dh_testdir                                                                      
dh_testroot                                                                     
rm -f build-stamp configure-stamp                                               
# Add here commands to clean up after the build process.                        
/scratchbox/tools/bin/make clean                                                
make[1]: Entering directory `/home/brent/quickclip-0.12.0'                      
make[1]: *** No rule to make target `clean'.  Stop.                             
make[1]: Leaving directory `/home/brent/quickclip-0.12.0'                       
make: *** [clean] Error 2
I didn't do anything to debian/rules; I wouldn't know what needed to be changed...

Any help would be greatly appreciated, even if is just a link to some documentation. Thanks.
__________________
-Brent

Author of TouchSearch -- web searching software for Maemo 5.

Mobile Device lineage: Palm Z22 -> Palm TX -> Nokia N800 -> Nokia N900
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#2
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

Last edited by qwerty12; 2009-03-15 at 20:39.
 

The Following User Says Thank You to qwerty12 For This Useful Post:
Posts: 6 | Thanked: 6 times | Joined on Nov 2007
#3
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)
 

The Following User Says Thank You to michaelnt For This Useful Post:
BrentDC's Avatar
Posts: 903 | Thanked: 632 times | Joined on Apr 2008
#4
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/ /
home/ /
usr/ /
Please tell me if this is the wrong format. I then uncommented dh_install from rules, but when I run dpkg-buildpackage -rfakeroot, I get this error:

Code:
[sbox-DIABLO_X86: ~/quickclip-0.12.0] > dpkg-buildpackage -rfakeroot
dpkg-buildpackage: source package is quickclip
dpkg-buildpackage: source version is 0.12.0-1
dpkg-buildpackage: source changed by brent User <bchiodo@gmail.com>
dpkg-buildpackage: host architecture i386
dpkg-buildpackage: source version without epoch 0.12.0-1
: Using Scratchbox tools to satisfy builddeps
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
#/scratchbox/tools/bin/make clean
dh_clean
dh_clean: Sorry, but 5 is the highest compatibility level supported by this debhelper.
make: *** [clean] Error 1
[sbox-DIABLO_X86: ~/quickclip-0.12.0] >
Any more help is greatly appreciated
__________________
-Brent

Author of TouchSearch -- web searching software for Maemo 5.

Mobile Device lineage: Palm Z22 -> Palm TX -> Nokia N800 -> Nokia N900
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#5
Run dh_make from scratchbox, not Ubuntu.
 
BrentDC's Avatar
Posts: 903 | Thanked: 632 times | Joined on Apr 2008
#6
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..
__________________
-Brent

Author of TouchSearch -- web searching software for Maemo 5.

Mobile Device lineage: Palm Z22 -> Palm TX -> Nokia N800 -> Nokia N900
 
BrentDC's Avatar
Posts: 903 | Thanked: 632 times | Joined on Apr 2008
#7
Originally Posted by qwerty12 View Post
Run dh_make from scratchbox, not Ubuntu.
Yeah, I was running it from scratchbox, but my compat file was too high (apparently?).
__________________
-Brent

Author of TouchSearch -- web searching software for Maemo 5.

Mobile Device lineage: Palm Z22 -> Palm TX -> Nokia N800 -> Nokia N900
 
BrentDC's Avatar
Posts: 903 | Thanked: 632 times | Joined on Apr 2008
#8
Ok, one last problem, when running dpkg-buildpackage -rfakeroot, I get this at the end:

Code:
dpkg-source: unrepresentable changes to source
I get a *.tar.gz file, but no *.deb

This website seems to think it has something to do with the clean process. Any ideas?

Thanks
__________________
-Brent

Author of TouchSearch -- web searching software for Maemo 5.

Mobile Device lineage: Palm Z22 -> Palm TX -> Nokia N800 -> Nokia N900
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#9
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:

dpkg-deb --build quickclip-0.12.0
from the directory above your quickclick directory? (and make the debian directory DEBIAN).

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.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!

Last edited by fatalsaint; 2009-03-16 at 21:07.
 

The Following User Says Thank You to fatalsaint For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#10
Originally Posted by BrentDC View Post
Ok, one last problem, when running dpkg-buildpackage -rfakeroot, I get this at the end:

Code:
dpkg-source: unrepresentable changes to source
I get a *.tar.gz file, but no *.deb

This website seems to think it has something to do with the clean process. Any ideas?

Thanks
Rename the .orig folder/tarball to whatever you wish for the quick way. But your problem is that a binary file/ non text based file was made (an pyc or pyo?) and -source can't diff that binary file. You can add "rm -f <unnecessary binary file>" to your clean target.
 

The Following User Says Thank You to qwerty12 For This Useful Post:
Reply

Tags
debian, packaging


 
Forum Jump


All times are GMT. The time now is 19:19.