Google Plus

How to make debian file from scratch

Written by Mel Kham on . Posted in Frequently Asked Questions

PLEASE LINK METHOD 1 AND 2 WITH SAMBA , AND EXPLAIN WHY WE SHOULD USE METHOD 1 & 2 AND WHICH RELATION HAS WITH SAMBA


Question: How to make  debian file from scratch ?

Answer:

First you need to download  some  dependencies  requered to build  a Debian files :

sudo apt-get install autotools-dev fakeroot dh-make build-essential

 

Methode 1

$ wget http://www.example.com/downloads/example.tar.gz
( Or use any common method you have used for download a file)

Now Extract the tar.gz file (it will automatically create a folder with first part of filename)
(for getting # prompt type sudo su and give your password)

#tar -xzvf example.tar.gz
#cd example
#./configure
#make
#sudo checkinstall

Methode 2

tar-zxvf example.tar.gz
cd example
# dh_make  -e (email) -f ../example.tar.gz

and pick Single for single binary, or whatever is appropriate for your project.

Edit the debian/control file and at least change the Maintainer and Description fields. There are a few other files you will probably want to edit.

Then run the following: (this has to be done as root)
# dpkg-buildpackage -rfakeroot

 

Lets  Show  you  example   of  Samba

1-Download  some  requered build  dependencies for  samba  with

sudo apt-get build-dep samba

2-Make  the debian directory  with :

dh_make  -e webmaster@unixmen.com -f ../samba-3.5.9.tar.gz 

Type of package: single binary, indep binary, multiple binary, library, kernel module, kernel patch?
[s/i/m/l/k/n] s

Maintainer name : Mel Kham
Email-Address    : webmaster@unixmen.com
Date                : Tue, 14 Jun 2011 10:13:08 -0400
Package Name     : samba
Version            : 3.5.9
License            : blank
Type of Package : Single
Hit <enter> to confirm:

3-Now  run  this  command to  start  building

dpkg-buildpackage -rfakeroot
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor):
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions
dpkg-buildpackage: source package samba
dpkg-buildpackage: source version 3.5.9-1
dpkg-buildpackage: source changed by Mel Kham <webmaster@unixmen.com>
dpkg-buildpackage: host architecture i386
dpkg-source --before-build samba-3.5.9

4-After  a  While check if  the  debian files has  been created

 

pirat9@Server-unixmen:~/Downloads/samba-3.5.9$ ls ../
samba-3.5.9                  samba_3.5.9-1.dsc           samba_3.5.9-1_i386.deb   samba-3.5.9.tar.gz
samba_3.5.9-1.debian.tar.gz  samba_3.5.9-1_i386.changes  samba_3.5.9.orig.tar.gz
For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

ClintB

|

After install as above, run shell script /opt/Citrix/ICAClient/wfica.sh manually and note lib errors still occur. I had the x64 motif loaded but had to manually install the x86 too. Got that from http://rpmfind.net/linux/rpm2html/search.php?query=libXm.so.4 Even after that, I still had to do a “yum install alsa-lib.i686 alsa-lib.x86_64″ to resolve any additional libasound.so.2 errors. Once those two lib issues were resolved, Citix Web Interface launched apps fine by telling browser to open launch.ica using /opt/Citrix/ICAClient/wfica.sh. Good luck Ernesto!

AD

|

I need some Help on Linux,can you guide me ?

Edson Carlos

|

In debian no found. I need link download install in linux debian

jacky can

|

You can actually unzip your secret archive by leaving out the -t option, instead using:

unzip newPhoto.jpg

DragonFartOutLoud

|

it went to china.

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .