[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Some newbie questions



Some time around  Fri, 19 Jun 1998 22:17:16 +0200, 
         Florian Hinzmann wrote:
 > -----BEGIN PGP SIGNED MESSAGE-----
 > 
 > Hello!
 > 
 > I am brand new to "debianization". ;)
 > I have read the manuals and tried to build a package.
 > 
 > Now that I actually started doing something some
 > questions showed up.
 > 
 > 
 > 1)
 > debmake or debhelper/dh_make? 
 > 
 > It looks like both packages are kind of actual:
 > They are maintained, bugs are to be fixed and so on ..
 >  
 > It is just a personal decision which one to use. 
 > Right?


Not quite.  Debstd is being deprecated. Its design is thought to be very bad 
by many developers (myself included), because debstd doesn't tell you 
everything of what it is doing.  Debhelper is a helper tool that has much 
better design, and seems to work great for many people.  You also have an 
option of not using any of the helper tools, and instead use the good old unix 
tools for your packaging.  




 > 
 > 
 > 2)
 > Running "build -rsudo" ends up in:
 > 
 > dpkg-deb: parse error, in file `debian/tmp/DEBIAN/control' near line 4 packa
 > ge
 > `gmp3':
 >  `Depends' field, missing package name, or garbage where package name expect
 > ed
 > make: *** [binary-arch] Error 2
 > 
 > Here are parts of the files which have to do with this
 > as far as I understood the process: 
 > - -------------- begin: control --------------
 > [...]
 > Package: gmp3
 > Architecture: any
 > Depends: ${shlibs:Depends}
 > Description: ...
 > [...]
 > - --------------- end: control ---------------
 > 
 > 
 > - --- begin: substvars --- (sure: This is one line originally ---
 > shlibs:Depends=gdk-imlib-nonfree1 (>=1.3) |  (>=1.3), giflib3g, \
                                     ^^^^^^^^^^^^^^^^^^

It looks like gdk-imlib-non-free1 has a bad shlibs file.  What I underlined 
above does not make sense.  You should investigate and file bug(s) if 
necessary.


 > libc6, libgtk1 (>= 1:1.0.4-1), libjpegg6a, libpng0g, libpng2, \
 > libtiff3g, xlib6g (>= 3.3-5), zlib1g
 > - --- end: substvars --------------------------------------------
 > 
 > 
 > - -------------- begin: rules --------------
 > #!/usr/bin/make -f
 > # Made with the aid of debmake, by Christoph Lameter,
 > # based on the sample debian/rules file for GNU hello by Ian Jackson.
 > 
 > package=gmp3
 > 
 > [...]
 > 
 > binary-arch: checkroot build
 >         $(checkdir)
 >         -rm -rf debian/tmp
 >         install -d debian/tmp
 >         cd debian/tmp && install -d `cat ../dirs`
 >         make install DESTDIR=`pwd`/debian/tmp
 > # Must have debmake installed for this to work. Otherwise please copy
 > # /usr/bin/debstd into the debian directory and change debstd to debian/debs
 > td
 >         debstd -u -p ChangeLog README TODO COPYING PATCHES INSTALL
 >         dpkg-gencontrol
 >         chown -R root.root debian/tmp
 >         chmod -R go=rX debian/tmp
 >         dpkg --build debian/tmp ..
 > [...]
 > - --------------- end: rules ---------------
 > 
 > I thought, the generated line in substvars should fill
 > my Dependency field. Do I have to run some command
 > to make this happen?


You are right, but substvars is broken as generated.

 > 
 > 
 > 3) 
 > The way I know now to build a debian package is:
 > 
 > First "debmake" or "debhelper/dh_make".
 > Then manual customations.
 > Then "build" where some tools out of debmake or debhelper are used.
 > 
 > So it turns out to be a decision between debmake and debhelper.
 > Are there more? I heard there are some nice tools wich
 > work with CVS. I didn't use CVS yet, but I installed it and
 > wanted to give it a look soon.


Try cvs-buildpackage.  I still  haven't had time to play with it, but I hear 
it's very cool :).

 > 
 > I would be glad if someone would list the possibilities I
 > have to build debs.
 > 
 > 
 > 4) 
 > The generated debian/rules files had
 > 'make CFLAGS="-O2 -g -Wall"'
 > in their target named "build".
 > 
 > Should every debian-file have debugger-information compiled in?
 > (-g is the debugger-information swith, isn't it?)

This is not necessary but benefits you, the developer.  You can compile with 
debugging symbols, and in case you need to debug, you wouldn't have to 
recompile.  However, in the binary-arch target you need to strip the binaries. 
Debstd does this automatically IIRC and there must be dh_strip in debhelper.   
Of course you can also use the 'strip' command or 'install -s'  


 > 
 > I removed the CFLAGS from debian/rules. If I leave them there
 > the CFLAGS of my upstream Makefile aren't used. Is there a 
 > way both are appended?

I think CFLAGS += should do what you want, but this is off the top of my head. 
Check make docs.

-- 
Proudly running Debian Linux! Linux vs. Windows is a no-Win situation....
Igor Grobman           igor@debian.org                 igor@igoria.net 



--  
To UNSUBSCRIBE, email to debian-mentors-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: