Warning, /packaging/snap-kf5/Rakefile is written in an unsupported language. File is not indexed.

0001 SOURCES = [
0002   'deb http://archive.neon.kde.org/release xenial main',
0003   'deb-src http://archive.neon.kde.org/release xenial main'
0004 ].freeze
0005 
0006 task :'repo::setup' do
0007   File.open('/etc/apt/sources.list.d/neon.list', 'w') do |f|
0008     SOURCES.each { |line| f.puts(line) }
0009   end
0010   # TODO: would be better if we let all repo setup be handled thru the helper
0011   #   currently this only sets up key and proxy (if applicable)
0012   sh '/tooling/nci/setup_apt_repo.rb --no-repo'
0013   sh 'apt update'
0014 end
0015 
0016 task :generate do
0017   # Dependency of deb822 parser borrowed from pangea-tooling.
0018   sh 'gem install insensitive_hash'
0019   ruby 'atomize-debs.rb'
0020 end
0021 task :generate => :'repo::setup'
0022 
0023 task :snapcraft do
0024   require 'pp'
0025   pp ENV
0026   sh 'apt install -y snapcraft'
0027   sh 'snapcraft --debug'
0028   sh 'ls -lah prime'
0029   cleanup = %w[
0030     stage/usr/share/emoticons/*
0031     stage/usr/share/icons/*
0032     stage/usr/share/locale/*/LC_*/*
0033     stage/usr/share/qt5/translations/*
0034     stage/usr/lib/*/dri/*
0035   ]
0036   sh "rm -rf #{cleanup.join(' ')}"
0037   sh 'XZ_OPT=-2 tar -cJf kde-frameworks-5-dev_amd64.tar.xz stage'
0038   ruby 'extend_content.rb'
0039 end
0040 task :snapcraft => :'repo::setup'
0041 
0042 task :publish do
0043   require 'fileutils'
0044   sh 'apt update'
0045   sh 'apt install -y snapcraft'
0046   cfgdir = Dir.home + '/.config/snapcraft'
0047   FileUtils.mkpath(cfgdir)
0048   File.write("#{cfgdir}/snapcraft.cfg", File.read('snapcraft.cfg'))
0049   sh 'snapcraft push *.snap --release candidate'
0050 end