mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Prototype Debian rules file
This commit is contained in:
parent
3537e74d49
commit
3c9f4dd66f
2 changed files with 26 additions and 0 deletions
20
RoboFile.php
20
RoboFile.php
|
@ -246,6 +246,26 @@ class RoboFile extends \Robo\Tasks {
|
||||||
return $t->run();
|
return $t->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Packages a release tarball into a Debian package */
|
||||||
|
public function packageDeb(string $tarball): Result {
|
||||||
|
$t = $this->collectionBuilder();
|
||||||
|
$dir = $t->tmpDir().\DIRECTORY_SEPARATOR;
|
||||||
|
// name the "orig" tarball
|
||||||
|
$orig = $dir.str_replace(".tar.gz", ".orig.tar.gz", str_replace("arsse-", "arsse_", basename($tarball)));
|
||||||
|
// copy the tarball
|
||||||
|
$t->addTask($this->taskFilesystemStack()->copy($tarball, $orig));
|
||||||
|
// extract the tarball and keep all "dist files"
|
||||||
|
$t->addCode(function() use ($tarball, $dir) {
|
||||||
|
// because Robo doesn't support extracting a single file we have to do it ourselves
|
||||||
|
(new \Archive_Tar($tarball))->extract($dir, false);
|
||||||
|
// perform a do-nothing filesystem operation since we need a Robo task result
|
||||||
|
return $this->taskFilesystemStack()->rename($dir."arsse", $dir."src")->run();
|
||||||
|
});
|
||||||
|
$t->addTask($this->taskFilesystemStack()->mirror($dir."src/dist", $dir));
|
||||||
|
$t->addTask($this->taskExec("deber")->dir($dir));
|
||||||
|
return $t->run();
|
||||||
|
}
|
||||||
|
|
||||||
/** Generates static manual pages in the "manual" directory
|
/** Generates static manual pages in the "manual" directory
|
||||||
*
|
*
|
||||||
* The resultant files are suitable for offline viewing and inclusion into release builds
|
* The resultant files are suitable for offline viewing and inclusion into release builds
|
||||||
|
|
6
dist/debian/rules
vendored
Normal file
6
dist/debian/rules
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
DH_VERBOSE = 1
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
Loading…
Reference in a new issue