Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Flatpak #624

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Makefile
vendor/
.flatpak-builder
flatpak/_build
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "flatpak/shared-modules"]
path = flatpak/shared-modules
url = https://github.com/flathub/shared-modules
[submodule "flatpak/flatpak-builder-tools"]
path = flatpak/flatpak-builder-tools
url = https://github.com/flatpak/flatpak-builder-tools
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'
gem 'gettext'
gem 'gtk2'
gem 'rexml'
46 changes: 46 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
GEM
remote: https://rubygems.org/
specs:
atk (3.3.2)
glib2 (= 3.3.2)
cairo (1.16.2)
native-package-installer (>= 1.0.3)
pkg-config (>= 1.2.2)
cairo-gobject (3.3.2)
cairo (>= 1.16.2)
glib2 (= 3.3.2)
gdk_pixbuf2 (3.3.2)
gio2 (= 3.3.2)
gettext (3.2.9)
locale (>= 2.0.5)
text (>= 1.3.0)
gio2 (3.3.2)
gobject-introspection (= 3.3.2)
glib2 (3.3.2)
native-package-installer (>= 1.0.3)
pkg-config (>= 1.2.2)
gobject-introspection (3.3.2)
glib2 (= 3.3.2)
gtk2 (3.3.2)
atk (= 3.3.2)
gdk_pixbuf2 (= 3.3.2)
pango (= 3.3.2)
locale (2.1.2)
native-package-installer (1.0.6)
pango (3.3.2)
cairo-gobject (= 3.3.2)
gobject-introspection (= 3.3.2)
pkg-config (1.3.4)
rexml (3.2.0)
text (1.3.1)

PLATFORMS
ruby

DEPENDENCIES
gettext
gtk2
rexml

BUNDLED WITH
2.0.1
12 changes: 12 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ $BINDIR='/bin'
$LOCALE='/share/locale'
$ICONDIR='/share/icons/hicolor/128x128/apps'
$DESKTOP='/share/applications'
$APPDATA='/share/appdata'
$RUBYDIR= '/lib/rubyripper'

if RUBY_PLATFORM.include?('darwin')
Expand Down Expand Up @@ -157,6 +158,7 @@ makefile.puts "BINDIR=#{$PREFIX}#{$BINDIR}"
makefile.puts "LOCALE=#{$PREFIX}#{$LOCALE}"
makefile.puts "ICONDIR=#{$PREFIX}#{$ICONDIR}"
makefile.puts "DESKTOP=#{$PREFIX}#{$DESKTOP}"
makefile.puts "APPDATA=#{$PREFIX}#{$APPDATA}"
makefile.puts "RUBYDIR=#{$PREFIX}#{$RUBYDIR}"
makefile.puts ""
makefile.puts "all:"
Expand All @@ -171,6 +173,7 @@ if $GTK2
makefile.puts "\t#{$INSTALL} -m 755 bin/rubyripper_gtk2 $(prefix)$(DESTDIR)$(BINDIR)/rrip_gui"
makefile.puts "\t#{$INSTALL} -m 644 #{$ICONDIR[1..-1]}/rubyripper.png $(prefix)$(DESTDIR)$(ICONDIR)/rubyripper.png"
makefile.puts "\t#{$INSTALL} -m 644 #{$DESKTOP[1..-1]}/rubyripper.desktop $(prefix)$(DESTDIR)$(DESKTOP)/rubyripper.desktop"
makefile.puts "\t#{$INSTALL} -m 644 #{$APPDATA[1..-1]}/rubyripper.appdata.xml $(prefix)$(DESTDIR)$(DESKTOP)/rubyripper.appdata.xml"
end

if $CLI
Expand Down Expand Up @@ -199,6 +202,14 @@ end
$LANG.each do |lang|
makefile.puts "\trm -f $(prefix)$(DESTDIR)$(LOCALE)/#{lang}/LC_MESSAGES/rubyripper.mo"
end
makefile.puts ""
makefile.puts "flatpak-update-gems:"
makefile.puts "\truby flatpak/flatpak-builder-tools/rubygems/flatpak_rubygems_generator.rb -s rubygems-gemfile.json -o flatpak/rubygems.json"

makefile.puts ""
makefile.puts "flatpak-build:"
makefile.puts "\tcd flatpak; flatpak-builder --force-clean _build io.github.RubyRipper.yaml"

makefile.puts ""
makefile.puts "clean:"
makefile.puts "\trm -rf locale/"
Expand All @@ -218,6 +229,7 @@ puts "* Executables: #{$PREFIX}#{$BINDIR}"
puts "* Localization files: #{$PREFIX}#{$LOCALE}"
puts "* Icon file: #{$PREFIX}#{$ICONDIR}"
puts "* Desktop file: #{$PREFIX}#{$DESKTOP}"
puts "* Appdata file: #{$PREFIX}#{$APPDATA}"
puts "* Library files: #{$PREFIX}#{$RUBYDIR}"
puts ""

Expand Down
1 change: 1 addition & 0 deletions flatpak/flatpak-builder-tools
Submodule flatpak-builder-tools added at b59fa8
121 changes: 121 additions & 0 deletions flatpak/io.github.Rubyripper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
app-id: io.github.Rubyripper
runtime: org.freedesktop.Platform
runtime-version: '18.08'
sdk: org.freedesktop.Sdk
command: rrip_gui
rename-desktop-file: rubyripper.desktop
rename-icon: rubyripper
finish-args:
- '--share=network'
- '--socket=x11'
- '--device=all'
- '--filesystem=home'
modules:
- shared-modules/gtk2/gtk2.json

- name: cdparanoia
no-parallel-make: true
sources:
- type: archive
url: https://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-10.2.src.tgz
sha256: 005db45ef4ee017f5c32ec124f913a0546e77014266c6a1c50df902a55fe64df

- name: cdrdao
config-opts:
- '--without-mp3-support'
- '--without-ogg-support'
sources:
- type: archive
url: https://downloads.sourceforge.net/cdrdao/cdrdao-1.2.4.tar.bz2
sha256: 358d9cb83370ceaecdc60564cbf14c2ea2636eac60a966e2461c011ba09853b4

- name: libcdio
config-opts:
- '--disable-static'
- '--disable-cpp-progs'
- '--disable-example-progs'
- '--without-cd-drive'
- '--without-cd-read'
- '--without-cdda-player'
- '--without-iso-info'
sources:
- type: archive
url: https://ftp.gnu.org/gnu/libcdio/libcdio-2.0.0.tar.gz
sha256: 1b481b5da009bea31db875805665974e2fc568e2b2afa516f4036733657cf958

- name: cd-discid
buildsystem: simple
build-commands:
- 'make install PREFIX=/app'
sources:
- type: archive
url: http://linukz.org/download/cd-discid-1.4.tar.gz
sha256: ffd68cd406309e764be6af4d5cbcc309e132c13f3597c6a4570a1f218edd2c63

- name: vorbis-tools
sources:
- type: archive
url: https://downloads.xiph.org/releases/vorbis/vorbis-tools-1.4.0.tar.gz
sha256: a389395baa43f8e5a796c99daf62397e435a7e73531c9f44d9084055a05d22bc

- name: wavegain
buildsystem: simple
build-commands:
- 'gcc -DHAVE_CONFIG_H -o wavegain *.c -lm'
- 'install -m 755 wavegain /app/bin/wavegain'
sources:
- type: archive
url: http://www.rarewares.org/files/others/wavegain-1.3.1srcs.zip
sha256: 939bdcae73c59851f0a4aaf4e1ecee0815d293f105cc6372c95d4bbeb9346d3d

- name: vorbisgain
config-opts:
- '--enable-recursive'
sources:
- type: archive
url: https://www.sjeng.org/ftp/vorbis/vorbisgain-0.36.zip
sha256: e893be4c71f83799771e1335768588fdfb0f935e1add4b6e8133a6c6b07da1e3

- name: mp3gain
buildsystem: simple
build-commands:
- 'make OSTYPE=linux INSTALL_PATH=/app/bin install'
sources:
- type: archive
url: https://downloads.sourceforge.net/mp3gain/mp3gain-1_6_2-src.zip
sha256: 5cc04732ef32850d5878b28fbd8b85798d979a025990654aceeaa379bcc9596d

- name: normalize
sources:
- type: archive
url: https://savannah.nongnu.org/download/normalize/normalize-0.7.7.tar.gz
sha256: 6055a2abccc64296e1c38f9652f2056d3a3c096538e164b8b9526e10b486b3d8

- name: ruby
config-opts:
- '--disable-install-doc'
sources:
- type: archive
url: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.1.tar.gz
sha256: 17024fb7bb203d9cf7a5a42c78ff6ce77140f9d083676044a7db67f1e5191cb8

- name: bundler
buildsystem: simple
build-commands:
- 'gem install --local bundler*.gem'
sources:
- type: file
url: https://rubygems.org/downloads/bundler-2.0.1.gem
sha256: c7e38039993c9c2edc27397aef4a3370a4b35c7fae3d93e434e501c4bd7656ea

- rubygems.json

- name: rubyripper
config-opts:
- '--enable-lang=all'
- '--enable-gtk2'
- '--enable-cli'
- '--prefix=/app'
sources:
- type: dir
path: ..
8 changes: 8 additions & 0 deletions flatpak/rubygems-gemfile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[{
"type": "file",
"path": "../Gemfile"
},
{
"type": "file",
"path": "../Gemfile.lock"
}]
100 changes: 100 additions & 0 deletions flatpak/rubygems.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"name": "rubygems",
"buildsystem": "simple",
"build-commands": [
"bundle install --local"
],
"sources": [
"rubygems-gemfile.json",
{
"type": "file",
"url": "https://rubygems.org/gems/gtk2-3.3.2.gem",
"sha256": "1a9fcd1bc6e6a0cca3deebe45f52d25a82f4e9fb5ca397391328ef6a959194a8",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/cairo-1.16.2.gem",
"sha256": "d98d013bb9665de5f4f33eb7bd4102f4e1d4e94313418dafec6efec1c3366ba6",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/pango-3.3.2.gem",
"sha256": "37d575850006ce0c921623c140e2949f5dc59e69d6b32e4ee151106f9a967051",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/cairo-gobject-3.3.2.gem",
"sha256": "dfe9e70c74686c67ae7e340bbd79c0bb9cb5b5c0d791482d5bdbd95d5420048b",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/atk-3.3.2.gem",
"sha256": "001cd0c39a4f1a66a3a9e607b6fbdca052a3dc99f98a1ee55ad484e7798f859d",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/glib2-3.3.2.gem",
"sha256": "774cfa17cbff5ce44487af20b79c6b877ebd75c6d8b675be7440f6371f8a218f",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/native-package-installer-1.0.6.gem",
"sha256": "7cff2ddbedc529e5f98422288e198428fcf420d78ffabfd4c88536870dda0c3f",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/locale-2.1.2.gem",
"sha256": "1db4a6b5f21fcd64f397d61bf2af69840dc11b3176d1fa6d75a0e749f04a9aea",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/pkg-config-1.3.4.gem",
"sha256": "7042edd0a8cc5856732d014f569b86d6a959a8770bf4557ac318fae9b92dbda8",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/gdk_pixbuf2-3.3.2.gem",
"sha256": "67caf8a78b5b49636175929dc9621da42f2ea3da0b96980759b8683891423f1c",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/rexml-3.2.0.gem",
"sha256": "e45a2922ae016875b95172b915d3f017874bc98fd57eff5645b5db34d21a8c73",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/gobject-introspection-3.3.2.gem",
"sha256": "c749923d32d07741f34756392753edce50b9bb15ee99eee1e41793e74165d296",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/gio2-3.3.2.gem",
"sha256": "167dc7182ec3408c6de73bc7537572858dda0f9d1d4d129195dafd9f9a0f23b8",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/gettext-3.2.9.gem",
"sha256": "990392498a757dce3936ddaf4a65fefccbdf0ca9c62d51af57c032f58edcc41c",
"dest": "vendor/cache"
},
{
"type": "file",
"url": "https://rubygems.org/gems/text-1.3.1.gem",
"sha256": "2fbbbc82c1ce79c4195b13018a87cbb00d762bda39241bb3cdc32792759dd3f4",
"dest": "vendor/cache"
}
]
}
1 change: 1 addition & 0 deletions flatpak/shared-modules
Submodule shared-modules added at 9e85e9
Loading