Debian File Creation
Step 1: Create a folder of with your desied project name. [eg. projectname]
Step 2: Create an empty folders as follows.
- DEBIAN [must be caps]
- usr
Step 3: Within DEBIAN folder create a file as 'control' without any extention and put the following data in to that.
Package: projectname
Version: 2.6-r1473-1
Section: editors
Priority: optional
Architecture: all
Depends: sun-java5-jre | sun-java6-jre | openjdk-6-jre | openjdk-7-jre
Conflicts: projectname-praha
Replaces: projectname-praha
Installed-Size: 15684
Maintainer: projectname Developers <contact@projectname.biz>
Homepage: http://projectname.biz/
Description: Free cross-platform project scheduling and management tool. Gantt chart, resource load chart, MS Project import/export.
projectname is a free and easy to use Gantt chart based project scheduling and management tool.
The full installation includes:
.
* Task hierarchy and dependencies
* Gantt chart
* Resource load chart
* Generation of PERT chart
* WebDAV based groupwork
* Export to PDF and HTML
* Microsoft Project import and export
Finally save and exit.
Step 4: Within DEBIAN folder create a file as 'postinst' without any extention and put this in that
#!/bin/sh
set-e
if [ "$1" = "configure" ]; then
if [ -e /usr/bin/projectname ]; then rm -f usr/bin/projectname; fi
ln -s /usr/bin/projectname/projectname /usr/bin/projectname
if [ -x "$(which update-menus 2>/dev/null)" ]; then update-menus; fi
if [ -x "$(which update-mime 2>/dev/null)" ]; then update-mime; fi
fi
Here, in 6th line "/usr/bin/projectname" are user defined, you can defined as your own that where you need to install your project.
Step 5: Within DEBIAN folder create a file as 'postrm' without any extention and put this in that
#!/bin/sh
set-e
if [ -e /usr/bin/projectname ]; then rm -f usr/bin/projectname; fi
if [ -x "$(which update-mime >/dev/null 2>&1)" ]; then update-mime; fi
if [ -x "$(which update-menus 2>/dev/null)" ]; then update-menus; fi
fi
Step 6: Within 'usr' folder create a folder as 'lib' and 'share' folders
- Within 'lib' folder create 'mime' folder.
- Within 'mime' folder create 'packages' folder.
Within 'packages' create a document as projectname with out any extention and put the following datas in it.
application/projectname+xml; projectname '%s'; description="projectname file"; test=test -n "$DISPLAY"; nametemplate=%s.gan
Step 7: Now come back to 'share' folder create five folders within the name of applications, doc, projectname, mime, pixmaps. Now
- Within 'applications' folder put 'projectname.desktop' file.
- Within 'doc' folder create 'projectname' folder and put the AUTHORS, README, LICENSE file from your project.
Now come back to 'share' folder and within 'projectname' folder put [ plugins folder, eclipsito.jar, projectname, HouseBuildingSample.gan (Here, projectname is runnable file.)] files from your project. These plugins folder, eclipsito.jar, projectname, HouseBuildingSample.gan things were created after you finish the execution of your project.
Now come back to 'share' folder and within 'mime' folder, create folder as 'packages' and within this folder put 'projectname.xml' file from your project.
Now come back to 'share' folder and within 'pixmaps' folder put 'projectname.png' file from your project. Instead of extention .png may use .jpeg or jpg.
Step 8: Now open the Terninal and open the folder/path that where the project is located (e.g. cd Desktop
):
write sudo dpkg -b <projectname>
The Debian file will be created. You can use that file to install that.
Errors While doing Debian packages:
May have chance to get like this errors that
control directory has bad permission 555 (must be>=0755 <=0775)
To solve this type of errors give this command
chmod 0755 <path of the project>
Eg: chmod 0755 /home/vrmg15/Desktop/projectname/DEBIAN