leanflutter / flutter_distributor

An all-in-one Flutter application packaging and distribution tool, providing you with a one-stop solution to meet various distribution needs.
https://distributor.leanflutter.dev/
MIT License
812 stars 114 forks source link

Complete implementation of Debian Binary (.deb) #80

Closed KRTirtho closed 2 years ago

KRTirtho commented 2 years ago

Adds complete support for .deb packages along with CONTROL file configurations along with postinst (Post Install) & postrm (Post Remove) Script support. All situated inside a simple YAML configuration file in the linux/packaging/deb

Example: (Also available in the hello_world example folder)

# the name used to display in the OS. Specifically desktop
# entry name
display_name: Hello World

# package name for debian/apt repository
# the name should be all lowercase with -+.
package_name: hello-world

maintainer:
  name: LiJianying
  email: lijy91@foxmail.com

co_authors:
  - name: Kingkor Roy Tirtho
    email: krtirtho@gmail.com

# enum options -> required, important, standard, optional, extra
# refer: https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities
priority: optional

# enum options: admin, cli-mono, comm, database, debug, devel, doc, editors, education, electronics, embedded, fonts, games, gnome, gnu-r, gnustep, graphics, hamradio, haskell, httpd, interpreters, introspection, java, javascript, kde, kernel, libdevel, libs, lisp, localization, mail, math, metapackages, misc, net, news, ocaml, oldlibs, otherosfs, perl, php, python, ruby, rust, science, shells, sound, tasks, tex, text, utils, vcs, video, web, x11, xfce, zope
# refer: https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
section: x11

# the size of binary in kilobyte
installed_size: 6604

# direct dependencies required by the application
# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html
# dependencies:
#   - libkeybinder-3.0-0 (>= 0.3.2)

# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html
# build_dependencies_indep:
#   - texinfo

# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html
# build_dependencies:
#   - kernel-headers-2.2.10 [!hurd-i386]
#   - gnumach-dev [hurd-i386]
#   - libluajit5.1-dev [i386 amd64 kfreebsd-i386 armel armhf powerpc mips]

# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html
# recommended_dependencies:
#   - neofetch

# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html
# suggested_dependencies:
#   - libkeybinder-3.0-0 (>= 0.3.2)

# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html
# enhances:
#   - spotube

# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html
# pre_dependencies:
#   - libc6

# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html#packages-which-break-other-packages-breaks
# breaks:
#   - libspotify (<< 3.0.0)

# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html#conflicting-binary-packages-conflicts
# conflicts:
#   - spotify

# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html#virtual-packages-provides
# provides:
#   - libx11

# refer: https://www.debian.org/doc/debian-policy/ch-relationships.html#overwriting-files-and-replacing-packages-replaces
# replaces:
#   - spotify

essential: false

postinstall_scripts:
  - echo `Installed my awesome app`
postuninstall_scripts:
  - echo `Surprised Pickachu face`

# application icon path relative to project url
icon: assets/logo.png

keywords:
  - Hello
  - World
  - Test
  - Application

# a name to categorize the app into a section of application
generic_name: Music Application

# supported mime types that can be opened using this application
# supported_mime_type:
#   - audio/mpeg

# shown when right clicked the desktop entry icons
# actions:
#   - Gallery
#   - Create

# the categories the application belong to
# refer: https://specifications.freedesktop.org/menu-spec/latest/
categories:
  - Music
  - Media

# let OS know if the application can be run on start_up. If it's false
# the application will deny to the OS if it was added as a start_up
# application
startup_notify: true
lijy91 commented 2 years ago

LGTM