Adding some flatpak files.

This commit is contained in:
Sergiotarxz 2024-10-29 19:50:36 +01:00
parent 5dda40ca42
commit fc157d4d66
5 changed files with 689 additions and 0 deletions

141
cpan.pl Normal file
View File

@ -0,0 +1,141 @@
#!/usr/bin/env perl
use v5.14;
use strict;
use warnings;
use Digest::SHA;
require File::Temp;
use File::Temp ();
use Getopt::Long::Descriptive;
use JSON::MaybeXS;
use LWP::UserAgent;
use MetaCPAN::Client;
use Capture::Tiny qw(tee);
sub scan_deps {
my @deps = grep(/^Successfully installed/, @_);
for (@deps)
{
s/^Successfully installed (\S+).*/$1/;
}
@deps
}
sub get_url_sha256 {
my ($url) = @_;
my $state = Digest::SHA->new(256);
my $ua = LWP::UserAgent->new;
$ua->env_proxy;
my $resp = $ua->get($url, ':read_size_hint' => 1024,
':content_cb' => sub {
my ($data) = @_;
$state->add($data);
});
die "Failed to get sha256 of $url: @{[$resp->status_line]}\n" if !$resp->is_success;
$state->hexdigest;
}
sub get_source_for_dep {
my ($cpan, $dep, $outdir) = @_;
my $release_set = $cpan->release({ name => $dep });
die "Unexpected @{[$release_set->total]} releases for $dep"
if $release_set->total != 1;
my $release = $release_set->next;
my $url = $release->download_url;
my $sha256 = get_url_sha256 $url;
{
type => 'archive',
url => $url,
sha256 => $sha256,
dest => "$outdir/@{[$release->distribution]}",
};
}
sub write_module_to_file {
my ($output, $root) = @_;
my $serializer = JSON::MaybeXS->new(indent => 1, space_after => 1, canonical => 1);
my $json = $serializer->encode($root);
open my $fh, '>', $output or die "Could not open $output for writing\n";
print $fh $json;
close $fh;
}
sub main {
my ($opts, $usage) = describe_options(
'flatpak-cpan-generator %o <packages...>',
['output|o=s', 'The generated sources file', { default => 'generated-sources.json' }],
['dir|d=s', 'The output directory used inside the sources file', { default => 'perl-libs' }],
['help|h', 'Show this screen', { shortcircuit => 1, hidden => 1 }],
);
if ($opts->help) {
print $usage->text;
exit;
}
die "At least one package is required.\n" if @ARGV == 0;
my $cpan = MetaCPAN::Client->new;
say '** Installing dependencies with cpanm...';
my $tmpdir = File::Temp->newdir;
my ($stdout, $stderr, $exit) = tee {
system ('cpanm', '-n', '-L', $tmpdir, "--", @ARGV);
};
die "cpanm failed with exit status $exit\n" if $exit != 0;
say '** Scanning dependencies...';
my @stdout = split "\n", $stdout;
my @deps = scan_deps @stdout;
# my @deps = scan_deps 'lib';
my @sources = ();
foreach my $dep (@deps) {
say "** Processing: $dep";
my $source = get_source_for_dep $cpan, $dep, $opts->dir;
push @sources, $source;
}
push @sources, {
type => 'script',
dest => $opts->dir,
'dest-filename' => 'install.sh',
commands => [
"set -e",
"function make_install {",
" mod_dir=\$1",
" cd \$mod_dir",
" if [ -f 'Makefile.PL' ]; then",
" perl Makefile.PL PREFIX=\${FLATPAK_DEST} && make install PREFIX=\${FLATPAK_DEST}",
" elif [ -f 'Build.PL' ]; then",
" perl Build.PL && ./Build && ./Build install",
" else",
" echo 'No Makefile.PL or Build.PL found. Do not know how to install this module'",
" exit 1",
" fi",
"}",
map { "(make_install $_->{dest})" } @sources
],
};
write_module_to_file $opts->output, \@sources;
}
main;

442
generated-sources.json Normal file
View File

@ -0,0 +1,442 @@
[
{
"dest": "perl-libs/Sub-Quote",
"sha256": "94bebd500af55762e83ea2f2bc594d87af828072370c7110c60c238a800d15b2",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Sub-Quote-2.006008.tar.gz"
},
{
"dest": "perl-libs/Role-Tiny",
"sha256": "d7bdee9e138a4f83aa52d0a981625644bda87ff16642dfa845dcb44d9a242b45",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Role-Tiny-2.002004.tar.gz"
},
{
"dest": "perl-libs/Class-Method-Modifiers",
"sha256": "65cd85bfe475d066e9186f7a8cc636070985b30b0ebb1cde8681cf062c2e15fc",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Class-Method-Modifiers-2.15.tar.gz"
},
{
"dest": "perl-libs/Moo",
"sha256": "fb5a2952649faed07373f220b78004a9c6aba387739133740c1770e9b1f4b108",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Moo-2.005005.tar.gz"
},
{
"dest": "perl-libs/ExtUtils-PkgConfig",
"sha256": "bbeaced995d7d8d10cfc51a3a5a66da41ceb2bc04fedcab50e10e6300e801c6e",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/X/XA/XAOC/ExtUtils-PkgConfig-1.16.tar.gz"
},
{
"dest": "perl-libs/ExtUtils-Depends",
"sha256": "673c4387e7896c1a216099c1fbb3faaa7763d7f5f95a1a56a60a2a2906c131c5",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/X/XA/XAOC/ExtUtils-Depends-0.8001.tar.gz"
},
{
"dest": "perl-libs/Glib",
"sha256": "d715f5a86bcc187075de85e7ae5bc07b0714d6edc196a92da43986efa44e5cbb",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/X/XA/XAOC/Glib-1.3294.tar.gz"
},
{
"dest": "perl-libs/Glib-Object-Introspection",
"sha256": "6569611dcc80ac1482c7c22264b1ae8c9c351d4983511eb9a6c5f47a10150089",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/X/XA/XAOC/Glib-Object-Introspection-0.051.tar.gz"
},
{
"dest": "perl-libs/Glib-IO",
"sha256": "f40facf4d4b2e5125dbebde51b5e4ed35f8394bc43316ca7be743b9bb70f7443",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/X/XA/XAOC/Glib-IO-0.002.tar.gz"
},
{
"dest": "perl-libs/JSON",
"sha256": "df8b5143d9a7de99c47b55f1a170bd1f69f711935c186a6dc0ab56dd05758e35",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.10.tar.gz"
},
{
"dest": "perl-libs/DBI",
"sha256": "e38b7a5efee129decda12383cf894963da971ffac303f54cc1b93e40e3cf9921",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/DBI-1.645.tgz"
},
{
"dest": "perl-libs/DBD-SQLite",
"sha256": "0a33a7a935be63371071dbe600cfaefa67cd971b67580a917bbf6ebaf723c584",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/DBD-SQLite-1.76.tar.gz"
},
{
"dest": "perl-libs/Path-Tiny",
"sha256": "861ef09bca68254e9ab24337bb6ec9d58593a792e9d68a27ee6bec2150f06741",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Path-Tiny-0.146.tar.gz"
},
{
"dest": "perl-libs/Net-Bluetooth",
"sha256": "4a16ebc659780ac5202b649e1a88332a2292606155c858741182718d3d712fb2",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/A/AD/ADDUTKO/Net-Bluetooth-0.41.tar.gz"
},
{
"dest": "perl-libs/Inline",
"sha256": "510a7de2d011b0db80b0874e8c0f7390010991000ae135cff7474df1e6d51e3a",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/I/IN/INGY/Inline-0.86.tar.gz"
},
{
"dest": "perl-libs/File-ShareDir-Install",
"sha256": "8f9533b198f2d4a9a5288cbc7d224f7679ad05a7a8573745599789428bc5aea0",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/E/ET/ETHER/File-ShareDir-Install-0.14.tar.gz"
},
{
"dest": "perl-libs/Parse-RecDescent",
"sha256": "1943336a4cb54f1788a733f0827c0c55db4310d5eae15e542639c9dd85656e37",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/J/JT/JTBRAUN/Parse-RecDescent-1.967015.tar.gz"
},
{
"dest": "perl-libs/YAML-PP",
"sha256": "a819465c52f6a341049a3942742c08e04f2894b2a66482e43a7f407ce10b4ea0",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/T/TI/TINITA/YAML-PP-v0.38.0.tar.gz"
},
{
"dest": "perl-libs/XXX",
"sha256": "d10510ea00f619abf47ab299f148bd5b360cfa07dc0ed518138b7cec72692d2a",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/I/IN/INGY/XXX-0.38.tar.gz"
},
{
"dest": "perl-libs/Pegex",
"sha256": "4dc8d335de80b25247cdb3f946f0d10d9ba0b3c34b0ed7d00316fd068fd05edc",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/I/IN/INGY/Pegex-0.75.tar.gz"
},
{
"dest": "perl-libs/Inline-C",
"sha256": "10fbcf1e158d1c8d77e1dd934e379165b126a45c13645ad0be9dc07d151dd0cc",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/E/ET/ETJ/Inline-C-0.82.tar.gz"
},
{
"dest": "perl-libs/Mojolicious",
"sha256": "9a9eb78663ffc4641af7c16a763411e05d9875a27d4f111d4944b690f9a1ef43",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-9.38.tar.gz"
},
{
"dest": "perl-libs/Cairo",
"sha256": "8219736e401c2311da5f515775de43fd87e6384b504da36a192f2b217643077f",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/X/XA/XAOC/Cairo-1.109.tar.gz"
},
{
"dest": "perl-libs/Pango",
"sha256": "34b0a422df3fecd7597587048552457d48ae764c43bbefd2a9d62ceb6c8bac71",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/X/XA/XAOC/Pango-1.227.tar.gz"
},
{
"dest": "perl-libs/Device-SerialPort",
"sha256": "d392567cb39b4ea606c0e0acafd8ed72320311b995336ece5fcefcf9b150e9d7",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/C/CO/COOK/Device-SerialPort-1.04.tar.gz"
},
{
"dest": "perl-libs/Archive-Zip",
"sha256": "984e185d785baf6129c6e75f8eb44411745ac00bf6122fb1c8e822a3861ec650",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/P/PH/PHRED/Archive-Zip-1.68.tar.gz"
},
{
"dest": "perl-libs/File-Which",
"sha256": "3201f1a60e3f16484082e6045c896842261fc345de9fb2e620fd2a2c7af3a93a",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Which-1.27.tar.gz"
},
{
"dest": "perl-libs/GD",
"sha256": "75ee23c67f699d94f7320eba731a3fbf97f0381a54d710e60a0abffc9c45a754",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/R/RU/RURBAN/GD-2.83.tar.gz"
},
{
"dest": "perl-libs/Test-Pod",
"sha256": "60a8dbcc60168bf1daa5cc2350236df9343e9878f4ab9830970a5dde6fe8e5fc",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-Pod-1.52.tar.gz"
},
{
"dest": "perl-libs/Exporter-Tiny",
"sha256": "6f295e2cbffb1dbc15bdb9dadc341671c1e0cd2bdf2d312b17526273c322638d",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/Exporter-Tiny-1.006002.tar.gz"
},
{
"dest": "perl-libs/Type-Tiny",
"sha256": "4c685ebbba5145dc02944c305e8e82759811032a55e6da270a751b63b76500ea",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/Type-Tiny-2.006000.tar.gz"
},
{
"dest": "perl-libs/Module-Build",
"sha256": "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4234.tar.gz"
},
{
"dest": "perl-libs/Module-Runtime",
"sha256": "68302ec646833547d410be28e09676db75006f4aa58a11f3bdb44ffe99f0f024",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/Module-Runtime-0.016.tar.gz"
},
{
"dest": "perl-libs/CPAN-Changes",
"sha256": "c0c9728743e5da7571ef358f6d7e6e54515115c8d6422f436a8d9306964cdd44",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/H/HA/HAARG/CPAN-Changes-0.500004.tar.gz"
},
{
"dest": "perl-libs/IO-HTML",
"sha256": "c87b2df59463bbf2c39596773dfb5c03bde0f7e1051af339f963f58c1cbd8bf5",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/C/CJ/CJM/IO-HTML-1.004.tar.gz"
},
{
"dest": "perl-libs/Clone",
"sha256": "4c2c0cb9a483efbf970cb1a75b2ca75b0e18cb84bcb5c09624f86e26b09c211d",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/Clone-0.47.tar.gz"
},
{
"dest": "perl-libs/LWP-MediaTypes",
"sha256": "8f1bca12dab16a1c2a7c03a49c5e58cce41a6fec9519f0aadfba8dad997919d9",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-6.04.tar.gz"
},
{
"dest": "perl-libs/TimeDate",
"sha256": "c0b69c4b039de6f501b0d9f13ec58c86b040c1f7e9b27ef249651c143d605eb2",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/TimeDate-2.33.tar.gz"
},
{
"dest": "perl-libs/HTTP-Date",
"sha256": "7b685191c6acc3e773d1fc02c95ee1f9fae94f77783175f5e78c181cc92d2b52",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-6.06.tar.gz"
},
{
"dest": "perl-libs/Encode-Locale",
"sha256": "176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/G/GA/GAAS/Encode-Locale-1.05.tar.gz"
},
{
"dest": "perl-libs/MIME-Base32",
"sha256": "ab21fa99130e33a0aff6cdb596f647e5e565d207d634ba2ef06bdbef50424e99",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/MIME-Base32-1.303.tar.gz"
},
{
"dest": "perl-libs/URI",
"sha256": "a34b9f626c3ff1e20c0d4a23ec5c8b7ae1de1fb674ecefed7e46791388137372",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.29.tar.gz"
},
{
"dest": "perl-libs/HTTP-Message",
"sha256": "5afa95eb6ed1c632e81656201a2738e2c1bc6cbfae2f6d82728e2bb0b519c1dc",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Message-7.00.tar.gz"
},
{
"dest": "perl-libs/HTML-Tagset",
"sha256": "eb89e145a608ed1f8f141a57472ee5f69e67592a432dcd2e8b1dbb445f2b230b",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/HTML-Tagset-3.24.tar.gz"
},
{
"dest": "perl-libs/HTML-Parser",
"sha256": "7278ce9791256132b26a71a5719451844704bb9674b58302c3486df43584f8c0",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTML-Parser-3.83.tar.gz"
},
{
"dest": "perl-libs/Net-HTTP",
"sha256": "0d65c09dd6c8589b2ae1118174d3c1a61703b6ecfc14a3442a8c74af65e0c94e",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/Net-HTTP-6.23.tar.gz"
},
{
"dest": "perl-libs/File-Listing",
"sha256": "189b3a13fc0a1ba412b9d9ec5901e9e5e444cc746b9f0156d4399370d33655c6",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Listing-6.16.tar.gz"
},
{
"dest": "perl-libs/WWW-RobotRules",
"sha256": "46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/G/GA/GAAS/WWW-RobotRules-6.02.tar.gz"
},
{
"dest": "perl-libs/HTTP-Cookies",
"sha256": "8c9a541a4a39f6c0c7e3d0b700b05dfdb830bd490a1b1942a7dedd1b50d9a8c8",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Cookies-6.11.tar.gz"
},
{
"dest": "perl-libs/HTTP-Negotiate",
"sha256": "1c729c1ea63100e878405cda7d66f9adfd3ed4f1d6cacaca0ee9152df728e016",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTTP-Negotiate-6.01.tar.gz"
},
{
"dest": "perl-libs/Try-Tiny",
"sha256": "ef2d6cab0bad18e3ab1c4e6125cc5f695c7e459899f512451c8fa3ef83fa7fc0",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.32.tar.gz"
},
{
"dest": "perl-libs/libwww-perl",
"sha256": "94a907d6b3ea8d966ef43deffd4fa31f5500142b4c00489bfd403860a5f060e4",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.77.tar.gz"
},
{
"dest": "perl-libs/XML-Parser",
"sha256": "ad4aae643ec784f489b956abe952432871a622d4e2b5c619e8855accbfc4d1d8",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.47.tar.gz"
},
{
"dest": "perl-libs/XML-Twig",
"sha256": "fef75826c24f2b877d0a0d2645212fc4fb9756ed4d2711614ac15c497e8680ad",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/M/MI/MIROD/XML-Twig-3.52.tar.gz"
},
{
"dest": "perl-libs/Pod-Parser",
"sha256": "5deccbf55d750ce65588cd211c1a03fa1ef3aaa15d1ac2b8d85383a42c1427ea",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Parser-1.67.tar.gz"
},
{
"dest": "perl-libs/Devel-Symdump",
"sha256": "826f81a107f5592a2516766ed43beb47e10cc83edc9ea48090b02a36040776c0",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/A/AN/ANDK/Devel-Symdump-2.18.tar.gz"
},
{
"dest": "perl-libs/Pod-Coverage",
"sha256": "30b7a0b0c942f44a7552c0d34e9b1f2e0ba0b67955c61e3b1589ec369074b107",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Pod-Coverage-0.23.tar.gz"
},
{
"dest": "perl-libs/Test-Pod-Coverage",
"sha256": "48c9cca9f7d99eee741176445b431adf09c029e1aa57c4703c9f46f7601d40d4",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Test-Pod-Coverage-1.10.tar.gz"
},
{
"dest": "perl-libs/Net-DBus",
"sha256": "e7a1ac9ef4a1235b3fdbd5888f86c347182306467bd79abc9b0756a64b441cbc",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/D/DA/DANBERR/Net-DBus-1.2.0.tar.gz"
},
{
"dest": "perl-libs/UUID-Random",
"sha256": "9ffcdd991381ac75917cdc37172b8844e637117d32ab088f63660032d9dd83f4",
"type": "archive",
"url": "https://cpan.metacpan.org/authors/id/P/PE/PERLER/UUID-Random-0.04.tar.gz"
},
{
"commands": [
"set -e",
"function make_install {",
" mod_dir=$1",
" cd $mod_dir",
" if [ -f 'Makefile.PL' ]; then",
" perl Makefile.PL PREFIX=${FLATPAK_DEST} && make install PREFIX=${FLATPAK_DEST}",
" elif [ -f 'Build.PL' ]; then",
" perl Build.PL && ./Build && ./Build install",
" else",
" echo 'No Makefile.PL or Build.PL found. Do not know how to install this module'",
" exit 1",
" fi",
"}",
"(make_install perl-libs/Sub-Quote)",
"(make_install perl-libs/Role-Tiny)",
"(make_install perl-libs/Class-Method-Modifiers)",
"(make_install perl-libs/Moo)",
"(make_install perl-libs/ExtUtils-PkgConfig)",
"(make_install perl-libs/ExtUtils-Depends)",
"(make_install perl-libs/Glib)",
"(make_install perl-libs/Glib-Object-Introspection)",
"(make_install perl-libs/Glib-IO)",
"(make_install perl-libs/JSON)",
"(make_install perl-libs/DBI)",
"(make_install perl-libs/DBD-SQLite)",
"(make_install perl-libs/Path-Tiny)",
"(make_install perl-libs/Net-Bluetooth)",
"(make_install perl-libs/Inline)",
"(make_install perl-libs/File-ShareDir-Install)",
"(make_install perl-libs/Parse-RecDescent)",
"(make_install perl-libs/YAML-PP)",
"(make_install perl-libs/XXX)",
"(make_install perl-libs/Pegex)",
"(make_install perl-libs/Inline-C)",
"(make_install perl-libs/Mojolicious)",
"(make_install perl-libs/Cairo)",
"(make_install perl-libs/Pango)",
"(make_install perl-libs/Device-SerialPort)",
"(make_install perl-libs/Archive-Zip)",
"(make_install perl-libs/File-Which)",
"(make_install perl-libs/GD)",
"(make_install perl-libs/Test-Pod)",
"(make_install perl-libs/Exporter-Tiny)",
"(make_install perl-libs/Type-Tiny)",
"(make_install perl-libs/Module-Build)",
"(make_install perl-libs/Module-Runtime)",
"(make_install perl-libs/CPAN-Changes)",
"(make_install perl-libs/IO-HTML)",
"(make_install perl-libs/Clone)",
"(make_install perl-libs/LWP-MediaTypes)",
"(make_install perl-libs/TimeDate)",
"(make_install perl-libs/HTTP-Date)",
"(make_install perl-libs/Encode-Locale)",
"(make_install perl-libs/MIME-Base32)",
"(make_install perl-libs/URI)",
"(make_install perl-libs/HTTP-Message)",
"(make_install perl-libs/HTML-Tagset)",
"(make_install perl-libs/HTML-Parser)",
"(make_install perl-libs/Net-HTTP)",
"(make_install perl-libs/File-Listing)",
"(make_install perl-libs/WWW-RobotRules)",
"(make_install perl-libs/HTTP-Cookies)",
"(make_install perl-libs/HTTP-Negotiate)",
"(make_install perl-libs/Try-Tiny)",
"(make_install perl-libs/libwww-perl)",
"(make_install perl-libs/XML-Parser)",
"(make_install perl-libs/XML-Twig)",
"(make_install perl-libs/Pod-Parser)",
"(make_install perl-libs/Devel-Symdump)",
"(make_install perl-libs/Pod-Coverage)",
"(make_install perl-libs/Test-Pod-Coverage)",
"(make_install perl-libs/Net-DBus)",
"(make_install perl-libs/UUID-Random)"
],
"dest": "perl-libs",
"dest-filename": "install.sh",
"type": "script"
}
]

99
me.sergiotarxz.Exd.yml Normal file
View File

@ -0,0 +1,99 @@
id: "me.sergiotarxz.Exd"
runtime: "org.gnome.Platform"
runtime-version: "47"
sdk: "org.gnome.Sdk"
finish-args:
- --share=ipc
- --device=dri
- --socket=fallback-x11
- --socket=wayland
command: hiperthermia
modules:
- name: 'imagemagick'
sources:
- type: "git"
url: 'https://github.com/libgd/libgd'
commit: 'c2867fd56dd3198ca4d09572913166d60fb657f9'
- name: "perl"
no-autogen: true
config-opts:
- '-des'
# Build a shared library.
- '-Duseshrplib'
build-options:
cflags: '-fPIC'
ldflags: '-fpic'
sources:
- type: archive
url: https://www.cpan.org/src/5.0/perl-5.40.0.tar.gz
sha256: c740348f357396327a9795d3e8323bafd0fe8a5c7835fc1cbaba0cc8dfe7161f
- type: shell
commands:
# Have Flatpak run the GNU-compatible configure script.
- 'ln -s configure{.gnu,}'
# Restore write permission to the Perl libraries.
post-install:
- 'chmod -R u+w /app/lib/perl5'
# Clean up a bunch of stuff we don't need. Depending on your application,
# you may have to drop some of these (e.g. *.pod).
cleanup:
- '/bin/corelist'
- '/bin/cpan'
- '/bin/enc2xs'
- '/bin/encguess'
- '/bin/h2ph'
- '/bin/h2xs'
- '/bin/instmodsh'
- '/bin/json_pp'
- '/bin/libnetcfg'
- '/bin/perlbug'
- '/bin/perldoc'
- '/bin/perlivp'
- '/bin/perlthanks'
- '/bin/piconv'
- '/bin/pl2pm'
- '/bin/pod*'
- '/bin/prove'
- '/bin/ptar*'
- '/bin/shasum'
- '/bin/splain'
- '/bin/xsubpp'
- '/bin/zipdetails'
- '/include'
- '/man'
- '*.pod'
# Installs the modules generated by flatpak-cpan-generator.
# Note that *any* Makefile.PL-style modules MUST be installed in this one step,
# as once perllocal.pod is written in one module, it cannot be modified by others.
- name: perl-libs
buildsystem: simple
build-commands:
- 'perl-libs/install.sh'
# Same as with the Perl module, we need to restore write permission.
# However, -f is now passed to avoid errors from trying to touch files from the
# above module that are now marked as read-only.
post-install:
- 'chmod -Rf u+w /app/lib/perl5/site_perl'
sources:
- generated-sources.json
# This step should be customized based on the CPAN packages you're using.
cleanup:
- '/bin'
- '/man'
- name: "Hiperthermia"
buildsystem: simple
build-commands:
- 'cp -vr HiperthermiaSource ${FLATPAK_DEST}/Hiperthermia'
- 'glib-compile-resources --sourcedir=${FLATPAK_DEST}/Hiperthermia ${FLATPAK_DEST}/Hiperthermia/resources.xml'
- 'install -Dm644 HiperthermiaSource/me.sergiotarxz.Exd.desktop -t /app/share/applications/'
- 'install -Dm755 HiperthermiaSource/run.sh /app/bin/hiperthermia'
- 'install -Dm644 HiperthermiaSource/me.sergiotarxz.Exd-256.png /app/share/icons/hicolor/256x256/apps/me.sergiotarxz.Exd.png'
- 'install -Dm644 HiperthermiaSource/me.sergiotarxz.Exd.metainfo.xml -t /app/share/metainfo/'
sources:
- type: "git"
url: 'https://git.owlcode.tech/sergiotarxz/Exd'
commit: 'main'
# tag: "v0.26"
dest: 'HiperthermiaSource'

BIN
resources.gresource Normal file

Binary file not shown.

7
resources.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/me/sergiotarxz/Exd">
<file>style.css</file>
<file>style-dark.css</file>
</gresource>
</gresources>