From f844c17a9414352ada4b86dcfef2792eed6d6415 Mon Sep 17 00:00:00 2001 From: "J. KIng" Date: Sat, 22 May 2021 07:16:48 -0400 Subject: [PATCH] More Debian fixes --- RoboFile.php | 20 ++++++++++---------- dist/debian/control | 1 - dist/debian/copyright | 6 +++--- dist/debian/rules | 0 4 files changed, 13 insertions(+), 14 deletions(-) mode change 100644 => 100755 dist/debian/rules diff --git a/RoboFile.php b/RoboFile.php index 8cd5f58..8d6b8c0 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -248,26 +248,26 @@ class RoboFile extends \Robo\Tasks { /** Packages a release tarball into a Debian package */ public function packageDeb(string $tarball): Result { - $t = $this->collectionBuilder(); - $dir = $t->workDir("/home/jking/temp").\DIRECTORY_SEPARATOR; // determine the "upstream" (tagged) version if (preg_match('/^arsse-(\d+(?:\.\d+)*)/', basename($tarball), $m)) { $version = $m[1]; - $base = $dir."arsse-$version"; } else { 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) { // Robo's extract task is broken, so we do it manually (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.orig")->run(); + return $this->taskFilesystemStack()->rename($dir."arsse", $base)->run(); }); - // create a directory with the package name and "upstream" version; this is also special to Debian - $t->addTask($this->taskFilesystemStack()->mkdir($base)); - // copy relevant files to the directory - $t->addTask($this->taskFilesystemStack()->mirror("$base.orig/dist", $base)); + // re-pack the tarball using specific names special to debuild + $t->addTask($this->taskPack($dir."arsse_$version.orig.tar.gz")->addDir("arsse-$version", $base)); + // copy Debian files to lower down in the tree + $t->addTask($this->taskFilesystemStack()->mirror($base."dist/debian", $base."debian")); //$t->addTask($this->taskExec("deber")->dir($dir)); return $t->run(); } diff --git a/dist/debian/control b/dist/debian/control index 99221dd..2ea9726 100644 --- a/dist/debian/control +++ b/dist/debian/control @@ -11,7 +11,6 @@ Package: arsse Architecture: all Section: contrib/net Priority: optional -Essential: no Homepage: https://thearsse.com/ Description: Multi-protocol RSS/Atom newsfeed synchronization server The Arsse bridges the gap between multiple existing newsfeed aggregator diff --git a/dist/debian/copyright b/dist/debian/copyright index 29222cd..87ca14e 100644 --- a/dist/debian/copyright +++ b/dist/debian/copyright @@ -10,7 +10,7 @@ License: Expat License: Expat Copyright (c) 2017 J. King, Dustin Wilson - + . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation 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 Software is furnished to do so, subject to the following conditions: - + . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/dist/debian/rules b/dist/debian/rules old mode 100644 new mode 100755