3

I created a package (with dpkk-build and dh_make) from my own program source and got a deb-binary. So far, so good. No if I'd upload the package to my ppa and installed it from there, the program would not work because I did not specify where it should install the files. After creating and configuring the debian folder (after dh_make), my project folder looks like:

/main.py (the programm)
/icons/...
/saves/...
/debian/... 

Now my questions:

  • How/where (perhaps in control or rules in /debian?) do I specify where to copy the first 3 files/folders to? I would like to copy my whole program including the main script to /opt/extras.ubuntu.com/program-name.

  • Moreover I'd also need to copy a .desktop file to /usr/share/applications that executes the main.py script.

Where do I place the needed instructions?

EDIT

As the dh_make did not do itself but can be found in the docs here, I made an install-file in the /debian directory containing the files to be moved. After a debuild -S there was a subdirectory named like the package created, and in its tree structure (like the destination described in the install file) the files were placed. So I guess it will work on a regular install. Only one more question: How can I set chmod+x to those installed files?

Elder Geek
  • 36,023
  • 25
  • 98
  • 183
user2366975
  • 717
  • 1
  • 10
  • 19
  • 1
    Did you gave a look to this http://askubuntu.com/q/90764/169736? – Braiam Sep 19 '13 at 16:05
  • Now I did. I saw an install file there about which I have already read. After my dh_make, there was no install file in the debian-directory. So if i create the file manually and specify all places in the 'file path' 'copy file to this path' -manner, installing would work (e.g. with apt-get install name)? – user2366975 Sep 19 '13 at 16:39
  • You should create files as you see fit that comply with the manual/usage of the guides, after you think everything is done you should run lithian to check that everything complies the directives (as double verification method). – Braiam Sep 19 '13 at 16:41
  • So you mean that the install-file will be respected by dpkg-build? Don't want to mix things that aren't supposed to be used together – user2366975 Sep 19 '13 at 16:45
  • Did you ran dch --create? – Braiam Sep 19 '13 at 16:47
  • Only now, but it threw an error because the changelog already existed due to dh_make. – user2366975 Sep 19 '13 at 16:52
  • That's the problem you shouldn't use dh_make but dch. Remove the old debian/ directory and run on the clean sources dch --create – Braiam Sep 19 '13 at 16:54
  • Ok, I tried it from the project folder. It throws an error because there is no debian directory.

    But if I make an empty debian folder and run dch --create, there is only a changelog.dch file created, nothing else.

    – user2366975 Sep 19 '13 at 16:58
  • made an EDIT for the install-file – user2366975 Sep 19 '13 at 20:26
  • Ok you completely lost me, was the first issue fixed? – Braiam Sep 19 '13 at 20:28
  • Hm yes, it seems like the install-file is working as intended. I did not install the package yet, but the files are listed in a subdirectory with the correct path. Still, they dont have execution permission (chmod+x) which they should have imo (at least after a regular install, right?), so I need to give them permissions. – user2366975 Sep 19 '13 at 20:37
  • I think you should have applied those permissions before packaging the deb file... – Braiam Sep 19 '13 at 20:40
  • I have tried what you suggested, but still the files are without permission. Oh wait. The python script has permissions, the .desktop file not.. strange – user2366975 Sep 19 '13 at 21:07
  • If you would like to ask that question separated. Also, how many questions I have answered? Could you please ask one for each solution I presented, I think this one is duplicated of the link I provided earlier. – Braiam Sep 19 '13 at 21:29
  • Yes of course. Thank you a lot. Felt like "spamming" to many question would not be good, either. The question before answered by you was accepted ;) You could answer my question here with the install-file and I'll accept it – user2366975 Sep 19 '13 at 21:40
  • Err... if it's about the first question I think it should be closed of the link I provided earlier. The other issues merit their own questions. – Braiam Sep 19 '13 at 21:47
  • Yes ok but the system cant accept a comment as an answer, the question has to be answered not commented – user2366975 Sep 19 '13 at 21:57
  • Just read your comments and try to structure a question around it, with the issue that were presented. Then delete the comment corresponding to the question. IE. The first issue was that you used dh_make instead dch the second: are permissions set for the python script. blah blah, and final question (each of them in their own post) why does the .desktop files don't have executable permissions. Something like that. – Braiam Sep 19 '13 at 22:06
  • well i still use dh_make because dch did not solve anything. Why don't you just answer this question with sth. like "create an install file in /debian", I remove my edit, accept your answer and then we'll take care of the other points? – user2366975 Sep 19 '13 at 22:22
  • Here is another question – user2366975 Sep 19 '13 at 22:38

0 Answers0