2

I successfuly built a debian package with no errors. However pbuilder and my ppa upload does not copy files to /opt/ directory. I have the following tree:

├── opt 
│   └── myDir
│       └── myfile
└── DEBIAN
    ├── control
    ├── postinst
    └── preinst   and many more ....

I have created the template using dh_make and edited postinst, copyright, control etc.

I thought /opt will be automatically cloned to my /opt upon installation. This is the case when I build my package using debuild -us -uc and install that package using dpkg -i, but unfortunately does not happen when I check the output of pbuilder or my ppa. Only an empty build directory in /opt/myDir is created. I am willing to give any more information in case needed. Any guidance is appreciated.

Some information are as follows:

  1. debian/control file

    Source: myproj
    Section: utils
    Priority: optional
    Maintainer: My Name <myname...>
    Build-Depends: debhelper (>=9), sudo, qtbase5-dev, qtchooser, qt5-qmake, qtbase5-dev-tools, gksu, nmap, xterm, fontconfig
    Standards-Version: 3.9.6
    Homepage: <mygit..>
    #Vcs-Git: git://anonscm.debian.org/collab-maint/myproject.git
    #Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/myproject.git
    
    Package: mypackage
    Architecture: any
    Depends: ${shlibs:Depends}, ${misc:Depends}
    Description: descriptions
    
  2. postinst: is a bash script that compiles Qt project in target /opt/myDir

  3. I haven't touched rules file.
  4. copyright is well established.

debuild gives some warnings but no errors. Please help me solve the original problem of /opt not being cloned to the target filesystem. Thank you.

1 Answer 1

1
  • Probably you are using a custom build location, so debian helper couldn't figure out automatically where are the files.

  • DEBIAN?!!! in capital that mean this is a binary Debian package, Are you sure this is pre-built binary. Otherwise rename it to debian or recheck documentation.

  • If you don't want changing build rules for files location. Write a debian/<packagename>.install file which map each folder or file (in build tree) to the correct location for installation. For example, if you want to copy the source-package/opt to /opt after installation, the contents of this file should be

    opt/* opt
    

Ref: Debian Maintainer Guide

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .