from argparse import ArgumentParser
from pathlib import Path
from subprocess import run
+import os
import re
# build the source package
run(["debuild", "-i", "-us", "-uc", "-S"], cwd = upstream_root, check = True)
+ [orig_path] = project_root.glob("strikebot_*.orig.tar.xz")
+ orig_name = orig_path.name
+
# move outputs to build directory
for p in project_root.iterdir():
if _is_output(p):
p.rename(build_dir.joinpath(p.relative_to(project_root)))
+
+ # create temporary link for orig tarball to satisfy binary package build
+ orig_path.symlink_to(build_dir.joinpath(orig_name).relative_to(project_root))
elif args.cmd == "clean":
for p in build_dir.iterdir():
if _is_output(p):