MCMrARM / mcpelauncher-linux

Please note this is a legacy repository, please go to: https://github.com/minecraft-linux/mcpelauncher-manifest/wiki
GNU General Public License v3.0
310 stars 44 forks source link

Script for automated .deb building #299

Closed guppy42 closed 6 years ago

guppy42 commented 6 years ago

The script assumes that you have 'dpkg-deb' - but I think it's standard for all Ubuntu systems?

The makedeb.sh script contains builtin help that is accessible as makedeb.sh -h ;

./makedeb.sh 
makedeb.sh [-h] [-c] -v -a -e

  optional arguments:

    -h, --help      print this help
    -c, --cmake     path to cmake ( default: cmake )
    -t, --tempdir   path to store temporary files (default: /tmp )
    --notroot       Must add this to run the script as non root ( causes bad ownership of files in .deb )

  mandatory arguments:
    -e, --email     email address for package maintainer
    -a, --author    Name of package maintainer
    -v, --version   Version of package

  Before running this script please make sure that "make" can run succesfully.

but in case it's not clear enough here is an example of how I would mcpelauncher-linux_1.2.9_i386.deb with me as maintainer;

sudo ./makedeb.sh -a "Morten Haggren" --email morten.haggren@gmail.com -v 1.2.9 -c ~/tmp/cmake-3.7.1/bin/cmake

( I specify a different cmake because I use Ubuntu 16.04 where the native cmake is ancient )

The script doesn't need root per say - but the files needs to be owned by root or lintian will complain, you can by pass the root requirement by passing it .

The build .deb file is not 100% cosher;

$ lintian mcpelauncher-linux_1.2.9_i386.deb 
E: mcpelauncher-linux: embedded-library usr/local/share/mcpelauncher/bin/libcef.so: libavutil
E: mcpelauncher-linux: embedded-library usr/local/share/mcpelauncher/bin/libcef.so: libjpeg
E: mcpelauncher-linux: embedded-library usr/local/share/mcpelauncher/bin/libcef.so: lcms2
E: mcpelauncher-linux: embedded-library ... use --no-tag-display-limit to see all (or pipe to a file/program)
E: mcpelauncher-linux: unstripped-binary-or-object usr/local/share/mcpelauncher/bin/mcpelauncher
E: mcpelauncher-linux: missing-dependency-on-libc needed by usr/local/share/mcpelauncher/bin/libcef.so and 2 others
E: mcpelauncher-linux: changelog-file-missing-in-native-package
E: mcpelauncher-linux: copyright-file-contains-full-gpl-license
E: mcpelauncher-linux: copyright-should-refer-to-common-license-file-for-gpl
E: mcpelauncher-linux: section-is-dh_make-template
E: mcpelauncher-linux: dir-in-usr-local usr/local/bin/
E: mcpelauncher-linux: file-in-usr-local usr/local/bin/mcpelauncher
W: mcpelauncher-linux: file-in-unusual-dir usr/local/bin/mcpelauncher
E: mcpelauncher-linux: dir-in-usr-local usr/local/share/
E: mcpelauncher-linux: dir-in-usr-local usr/local/share/applications/
E: mcpelauncher-linux: file-in-usr-local usr/local/share/applications/mcpelauncher.desktop
W: mcpelauncher-linux: file-in-unusual-dir usr/local/share/applications/mcpelauncher.desktop
E: mcpelauncher-linux: dir-in-usr-local ... use --no-tag-display-limit to see all (or pipe to a file/program)
E: mcpelauncher-linux: file-in-usr-local usr/local/share/mcpelauncher/bin/icudtl.dat
W: mcpelauncher-linux: file-in-unusual-dir usr/local/share/mcpelauncher/bin/icudtl.dat
E: mcpelauncher-linux: file-in-usr-local ... use --no-tag-display-limit to see all (or pipe to a file/program)
W: mcpelauncher-linux: file-in-unusual-dir ... use --no-tag-display-limit to see all (or pipe to a file/program)
W: mcpelauncher-linux: executable-not-elf-or-script usr/local/share/mcpelauncher/libs/cef/res/locales/sw.pak
W: mcpelauncher-linux: executable-not-elf-or-script usr/local/share/mcpelauncher/libs/cef/res/locales/ar.pak
W: mcpelauncher-linux: executable-not-elf-or-script usr/local/share/mcpelauncher/libs/cef/res/locales/sk.pak
W: mcpelauncher-linux: executable-not-elf-or-script ... use --no-tag-display-limit to see all (or pipe to a file/program)
E: mcpelauncher-linux: shlib-with-non-pic-code usr/local/share/mcpelauncher/bin/libcef.so
E: mcpelauncher-linux: shlib-with-executable-bit usr/local/share/mcpelauncher/bin/libcef.so 0755
E: mcpelauncher-linux: shlib-with-executable-bit usr/local/share/mcpelauncher/libs/native/libfmod.so.9.6 0755
W: mcpelauncher-linux: shlib-with-executable-stack usr/local/share/mcpelauncher/libs/native/libfmod.so.9.6

I had to include the .desktop launcher in the correct dir ( usr/share/application vs usr/local/share/application ) for it to show up in the menu for some users.

I also changed the .desktop launcher for my own copy which uses the correct absolute paths.

guppy42 commented 6 years ago

@MCMrARM is there a problem with this pull?

MCMrARM commented 6 years ago

I think we should use CMake's built-in deb generator?

guppy42 commented 6 years ago

Okay