LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-08-2004, 02:56 AM   #1
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Rep: Reputation: 30
Possible to build deb package from source files?


There are some applications that are not available with apt-cache search. However, those applications' source file can be downloaded. Is it possible to package the source file into deb file and install via dpkg -i ? Or do I need to wait for that package to be made available on sources specified in /etc/apt/sources.list ?

Thanks !
 
Old 04-08-2004, 07:42 AM   #2
sims
Member
 
Registered: Mar 2004
Location: Australia
Distribution: Debian, Ubuntu
Posts: 55

Rep: Reputation: 15
You can build debs, yes. One example is the pine package.
Something like this should work.
cd /usr/src
apt-get source pine
apt-get build-dep pine
cd pine-4.x.x
dpkg-buildpackage
cd ..
dpkg -i pine-4.x.x.deb
 
Old 04-08-2004, 08:14 AM   #3
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Original Poster
Rep: Reputation: 30
What about source files in the form of *.tar.bz2 or *.tar.gz? Can I use apt-get build-dep on those tarballs?

Thanks !

Quote:
Originally posted by sims
You can build debs, yes. One example is the pine package.
Something like this should work.
cd /usr/src
apt-get source pine
apt-get build-dep pine
cd pine-4.x.x
dpkg-buildpackage
cd ..
dpkg -i pine-4.x.x.deb
 
Old 04-08-2004, 08:31 AM   #4
sims
Member
 
Registered: Mar 2004
Location: Australia
Distribution: Debian, Ubuntu
Posts: 55

Rep: Reputation: 15
You can only do apt-get build-dep for source packages in the apt archive.
Code:
# apt-get build-dep somepackage
Reading Package Lists... Done
Building Dependency Tree... Done
E: Unable to find a source package for somepackage
I've never tried building debs from *.tar.[gz|bz2].
http://www.debian.org/doc/manuals/re...s-creatingdebs
 
Old 04-08-2004, 11:51 AM   #5
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
this may help -- be sure to check the discussion below the parent post:

http://www.debianplanet.org/node.php?id=982&cid=12188

 
Old 12-08-2006, 09:00 PM   #6
TenEighty
Member
 
Registered: Oct 2004
Location: Vancouver, B.C., Canada
Distribution: Kubuntu
Posts: 59

Rep: Reputation: 15
The above link seems to be dead, sounds like it's what I'm after:

Download source tarball, build a debian package from it, install from the package.

From what I understand about installing from source, if "configure" and "make" run without errors, you have all the binaries and destinations to copy the binary files to. In that case, it should be possible, instead of doing "make install" to build a debain package from what is sitting in the source directory. I don't know the internals of either .deb packages or source distributions, but it seems logical.
 
Old 12-08-2006, 09:32 PM   #7
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
It so happens I'm currently building a 2.6.19 kernel the Debian way. I don't think it's exactly what you need, but it's start: http://www.debian.org/doc/manuals/re...reface.en.html
 
Old 12-08-2006, 10:32 PM   #8
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by TenEighty
The above link seems to be dead, sounds like it's what I'm after:

Download source tarball, build a debian package from it, install from the package.

From what I understand about installing from source, if "configure" and "make" run without errors, you have all the binaries and destinations to copy the binary files to. In that case, it should be possible, instead of doing "make install" to build a debain package from what is sitting in the source directory. I don't know the internals of either .deb packages or source distributions, but it seems logical.
Use the checkinstall package to build the .deb file it is used in place of the make install command with a command line similar to this su -c 'checkinstall -D --pkgname=package --pkgversion=1.2.3 --maintainer="Your Name your@email.com"' changing of course to the proper values it will ask for the root password type it in then hit enter key for it to build/install the package answer yes to creating the default docs. In case you do not have a clean ./configure install the apt-file package then as root apt-file update then once it completes you can as normal user apt-file search file/missing.h to find the package that contains the file you need then install it.
 
Old 12-09-2006, 11:52 AM   #9
JackieBrown
Member
 
Registered: Dec 2004
Location: San Antonio, TX
Distribution: Debian-AMD64 Sid
Posts: 481

Rep: Reputation: 31
Or you can do it the right way

http://www.debian.org/doc/manuals/ma.../index.en.html

Checkinstall is crass and should only be used as a last restort (or if you are in a hurry )
 
Old 12-09-2006, 06:27 PM   #10
TenEighty
Member
 
Registered: Oct 2004
Location: Vancouver, B.C., Canada
Distribution: Kubuntu
Posts: 59

Rep: Reputation: 15
I've seen the debian new maintainers guide, i tried reading it a bit, and it seems so far to be pretty involved. Since I don't want to really create packages for distribution, just to simplify install/remove on my own machine, I was hoping it didn't have to be quite that complicated, but it's good to know about the guide for sure.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to package a .deb file from source? hkl8324 Debian 1 06-09-2005 05:13 PM
how to create a deb package from a source abd_bela Debian 1 03-04-2005 10:27 AM
making a .deb from source files h/w Debian 2 01-05-2004 04:54 PM
files missing from my kernek source build... sylk Linux - Software 0 09-19-2003 07:23 PM
Howto on making .deb package files preben Debian 1 08-21-2003 07:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration