Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to create a debian packge of my PHP application and to upload to my PPA. I've been reading through the documentation but I am missing one important point:

How do I control in which directory my web-app gets installed to and which files are included? The PHP app does not need any compilation, so it is distributed in source form.

Steps already done:

  • Created a name-1.0.tar.gz which contains all the source

  • dh_make to setup the environment (although Im not sure which type i need in my case? (single binary, multiple binary, library) as I dont have a "binary" but just php script files).

  • Edited the copyright/control/changelog files.

    • After all that, I invoke dpkg-buildpackage -S -rfakeroot and the package is created.

Problem: The package has been created, but there are no files within it. I would like to install my web-app to /var/www/, so how do I get the packaging system to include all my web-app's *.php files and install it to /var/www?

I usually build Debian files with dpkg -b where it simple "maps" alle directories to the according file system. So I usually have the following tree:

  • DEBIAN
    • control
  • var
    • www
      • myproject
      • .... all files and subfolders

The package installs in /var/www/myproject/ and everything is fine.

But as I need to publish now to my PPA (which requires signing, hashing etc.), I need to follow the packaging guide with the previously mentioned problems.

share|improve this question
    
Ooops, thanks for the hint. Its complete now. –  mike_ Oct 17 '11 at 12:44
    
As a side note you MUST NOT install files to /var/www but rather put them in /usr/share/yourapp/ as phpmyadmin does (have a look at their deb file) and supply an apache vhost config file in /etc/yourapp/. –  Shadok Nov 16 '11 at 14:54
add comment

1 Answer

As for paths, I can tell you PPAs get extracted to /, and it's highly recommended to use autotools regardless of language of the source, so when a user performs the configure/make/make install the scripts take care of where to put everything.

I do not know why you are getting an empty package. Perhaps there is a log of the tools you are using somewhere? You'd like to think there's explicit output somewhere.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.