1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

More Debian fixes

This commit is contained in:
J. KIng 2021-05-22 07:16:48 -04:00
parent 0de9647809
commit f844c17a94
4 changed files with 13 additions and 14 deletions

View file

@ -248,26 +248,26 @@ class RoboFile extends \Robo\Tasks {
/** Packages a release tarball into a Debian package */ /** Packages a release tarball into a Debian package */
public function packageDeb(string $tarball): Result { public function packageDeb(string $tarball): Result {
$t = $this->collectionBuilder();
$dir = $t->workDir("/home/jking/temp").\DIRECTORY_SEPARATOR;
// determine the "upstream" (tagged) version // determine the "upstream" (tagged) version
if (preg_match('/^arsse-(\d+(?:\.\d+)*)/', basename($tarball), $m)) { if (preg_match('/^arsse-(\d+(?:\.\d+)*)/', basename($tarball), $m)) {
$version = $m[1]; $version = $m[1];
$base = $dir."arsse-$version";
} else { } else {
throw new \Exception("Tarball is not named correctly"); throw new \Exception("Tarball is not named correctly");
} }
// extract the tarball // start a task collection and create a temporary directory
$t = $this->collectionBuilder();
$dir = $t->workDir("/home/jking/temp").\DIRECTORY_SEPARATOR;
$base = $dir."arsse-$version".\DIRECTORY_SEPARATOR;
// start by extracting the tarball
$t->addCode(function() use ($tarball, $dir, $base) { $t->addCode(function() use ($tarball, $dir, $base) {
// Robo's extract task is broken, so we do it manually // Robo's extract task is broken, so we do it manually
(new \Archive_Tar($tarball))->extract($dir, false); (new \Archive_Tar($tarball))->extract($dir, false);
// "$package-$version.orig" is a special directory name to Debian's "quilt" format return $this->taskFilesystemStack()->rename($dir."arsse", $base)->run();
return $this->taskFilesystemStack()->rename($dir."arsse", "$base.orig")->run();
}); });
// create a directory with the package name and "upstream" version; this is also special to Debian // re-pack the tarball using specific names special to debuild
$t->addTask($this->taskFilesystemStack()->mkdir($base)); $t->addTask($this->taskPack($dir."arsse_$version.orig.tar.gz")->addDir("arsse-$version", $base));
// copy relevant files to the directory // copy Debian files to lower down in the tree
$t->addTask($this->taskFilesystemStack()->mirror("$base.orig/dist", $base)); $t->addTask($this->taskFilesystemStack()->mirror($base."dist/debian", $base."debian"));
//$t->addTask($this->taskExec("deber")->dir($dir)); //$t->addTask($this->taskExec("deber")->dir($dir));
return $t->run(); return $t->run();
} }

1
dist/debian/control vendored
View file

@ -11,7 +11,6 @@ Package: arsse
Architecture: all Architecture: all
Section: contrib/net Section: contrib/net
Priority: optional Priority: optional
Essential: no
Homepage: https://thearsse.com/ Homepage: https://thearsse.com/
Description: Multi-protocol RSS/Atom newsfeed synchronization server Description: Multi-protocol RSS/Atom newsfeed synchronization server
The Arsse bridges the gap between multiple existing newsfeed aggregator The Arsse bridges the gap between multiple existing newsfeed aggregator

View file

@ -10,7 +10,7 @@ License: Expat
License: Expat License: Expat
Copyright (c) 2017 J. King, Dustin Wilson Copyright (c) 2017 J. King, Dustin Wilson
.
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without files (the "Software"), to deal in the Software without
@ -19,10 +19,10 @@ License: Expat
copies of the Software, and to permit persons to whom the copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following Software is furnished to do so, subject to the following
conditions: conditions:
.
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND

0
dist/debian/rules vendored Normal file → Executable file
View file