bonigarcia / dualsub

DualSub: bilingual subtitles maker
http://bonigarcia.github.io/dualsub/
GNU General Public License v3.0
196 stars 33 forks source link

Fix Debian package #1

Closed darealshinji closed 10 years ago

darealshinji commented 10 years ago

Your Debian package is not made in a very clean way. Running Lintian on it gives me many warnings and errors:

djcj Downloads $ lintian dualsub-1.0.0.deb 
E: dualsub: changelog-file-missing-in-native-package
W: dualsub: unknown-control-file control~
E: dualsub: no-copyright-file
E: dualsub: description-starts-with-package-name
W: dualsub: extended-description-line-too-long
E: dualsub: wrong-file-owner-uid-or-gid usr/ 1001/1001
W: dualsub: non-standard-dir-perm usr/ 0700 != 0755
E: dualsub: wrong-file-owner-uid-or-gid usr/bin/ 1001/1001
W: dualsub: non-standard-dir-perm usr/bin/ 0700 != 0755
E: dualsub: wrong-file-owner-uid-or-gid usr/bin/dualsub 1001/1001
E: dualsub: wrong-file-owner-uid-or-gid usr/lib/ 1001/1001
W: dualsub: non-standard-dir-perm usr/lib/ 0700 != 0755
E: dualsub: wrong-file-owner-uid-or-gid usr/lib/dualsub/ 1001/1001
W: dualsub: non-standard-dir-perm usr/lib/dualsub/ 0700 != 0755
E: dualsub: wrong-file-owner-uid-or-gid usr/lib/dualsub/README.md 1001/1001
E: dualsub: wrong-file-owner-uid-or-gid usr/lib/dualsub/dualsub.jar 1001/1001
E: dualsub: wrong-file-owner-uid-or-gid usr/share/ 1001/1001
W: dualsub: non-standard-dir-perm usr/share/ 0700 != 0755
E: dualsub: wrong-file-owner-uid-or-gid usr/share/applications/ 1001/1001
W: dualsub: non-standard-dir-perm usr/share/applications/ 0700 != 0755
E: dualsub: wrong-file-owner-uid-or-gid usr/share/applications/dulasub.desktop 1001/1001
E: dualsub: wrong-file-owner-uid-or-gid usr/share/dualsub/ 1001/1001
W: dualsub: non-standard-dir-perm usr/share/dualsub/ 0700 != 0755
E: dualsub: wrong-file-owner-uid-or-gid usr/share/dualsub/dualsub.png 1001/1001
W: dualsub: jar-not-in-usr-share usr/lib/dualsub/dualsub.jar
W: dualsub: binary-without-manpage usr/bin/dualsub
W: dualsub: desktop-entry-file-has-crs usr/share/applications/dulasub.desktop:1
W: dualsub: desktop-entry-invalid-category Other usr/share/applications/dulasub.desktop

I was able to get rid of all these issues.

To sum it up, I moved the jar file to /usr/share, fixed the file permissions (run dpkg-deb with fakeroot), and added a manpage, copyright and changelog file. The rest were just some formatting issues.

Additionally I replaced the icon with a full set of hicolor icons and added Java to the package dependencies. I've also changed the category to "video" and set the version in the changelog from "1.0" to "1.0.0".

Here's the fixed package: https://github.com/darealshinji/dualsub/blob/debian/Debian/dualsub_1.0.0_all.deb

bonigarcia commented 10 years ago

Thanks a lot for reporting!

In short I am going to release a new version of my software DualSub. This version (1.0.1) resolves the detected bugs. This time I am going to try generate the dev package correctly.

Could you please give some hints to generate this package correctly from the jar file?

In addition, the first time I tried to publish DualSub in a ppa repository:

https://launchpad.net/~bonigarcia/+archive/ubuntu/dualsub

... but I didn't managed to do it.

Do you know how to do publish a Java application to a ppa repository?

Thanks a lot!

darealshinji commented 10 years ago

I need to know the commands to compile a java app. And when you say dev package, what files should that one include? Normally those packages include C headers and static libs, is there such an equivalent to java (I don't know much about Java at all)?

bonigarcia commented 10 years ago

That was a typo. I meant "deb package", not "dev pacakge".

In this deb file it should be packaged the runnable jar file, which is obtained from the sources using Maven: mvn clean compile assembly:single This command compiles .java and generates the output, a jar file, which is then packaged in the deb.

darealshinji commented 10 years ago

In src/main/resources/img are the cosmos*.gif files really necessary? Together their size is 60 mb, without them the app would have less then 2 mb. Maybe you could delete or move other image files that aren't needed by the app too? edit: Replacing the VLC snapshot with a JPEG saves a few kb too.

darealshinji commented 10 years ago

I made a pull request which includes the files to build a Debian package: https://github.com/bonigarcia/dualsub/pull/2