<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=7203&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [HowTo] samurai_1.9.0-1_amd64.deb (ninja-compatible) patched with SED]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=7203</link>
		<description><![CDATA[The most recent posts in [HowTo] samurai_1.9.0-1_amd64.deb (ninja-compatible) patched with SED.]]></description>
		<lastBuildDate>Thu, 22 May 2025 07:27:07 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[[HowTo] samurai_1.9.0-1_amd64.deb (ninja-compatible) patched with SED]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=55709#p55709</link>
			<description><![CDATA[<p><strong>samurai</strong> is a ninja-compatible build tool written in C99 with a focus on simplicity, speed, and portability.<br />_https://github.com/michaelforney/samurai</p><p><strong>samurai</strong> - Arch Linux<br />_https://archlinux.org/packages/extra/x86_64/samurai/<br />_https://gitlab.archlinux.org/archlinux/packaging/packages/samurai<br />_https://gitlab.archlinux.org/archlinux/packaging/packages/samurai/-/blob/main/PKGBUILD?ref_type=heads</p><p>Install build-essential, etc.</p><div class="codebox"><pre><code>sudo apt install build-essential debhelper dh_make fakeroot git sed tree quilt </code></pre></div><p>Download sourcedir:</p><div class="codebox"><pre><code>mkdir BUILD_SAMU
cd BUILD_SAMU
git clone https://github.com/michaelforney/samurai.git --depth 1 </code></pre></div><p>Install a template:</p><div class="codebox"><pre><code>cd samurai
export DEBFULLNAME=&quot;John Frum&quot;
dh_make --createorig -p samurai_1.9.0 -c apache -e my@mail.org -s </code></pre></div><div class="codebox"><pre><code>$ dh_auto_build --list | grep Auto-selected
Auto-selected: makefile </code></pre></div><p>Create <span class="bbc">debian/samurai.install</span></p><div class="codebox"><pre><code>echo -e &#039;LICENSE usr/share/licenses/samurai&#039; &gt;&gt; debian/samurai.install </code></pre></div><div class="codebox"><pre><code>$ cat debian/samurai.install
LICENSE usr/share/licenses/samurai </code></pre></div><p>Append 7 lines to <span class="bbc">debian/rules</span> with <span class="bbc">echo</span> command</p><div class="codebox"><pre><code>echo -e &quot;# For HTML docs are missing\nexport DH_ALWAYS_EXCLUDE=doc:doc-base\n# Patching Makefile with sed\noverride_dh_auto_build:\n\tsed -i -e &#039;s/usr\/local/usr/g&#039; Makefile\n\tdh_auto_build --\n&quot; &gt;&gt; debian/rules </code></pre></div><div class="codebox"><pre><code>$ cat -A debian/rules |grep Patching -A5 -B2
# For HTML docs are missing$
export DH_ALWAYS_EXCLUDE=doc:doc-base$
# Patching Makefile with sed$
override_dh_auto_build:$
^Ised -i -e &#039;s/usr\/local/usr/g&#039; Makefile$
^Idh_auto_build --$
$ </code></pre></div><div class="codebox"><pre><code>$ tail -7 debian/rules
# For HTML docs are missing
export DH_ALWAYS_EXCLUDE=doc:doc-base
# Patching Makefile with sed
override_dh_auto_build:
	sed -i -e &#039;s/usr\/local/usr/g&#039; Makefile
	dh_auto_build --</code></pre></div><p>Edit <span class="bbc">debian/control</span></p><div class="codebox"><pre><code>nano debian/control</code></pre></div><div class="codebox"><pre><code>$ cat debian/control
Source: samurai
Section: devel
Priority: optional
Maintainer: John Frum &lt;my@mail.org&gt;
Rules-Requires-Root: no
Build-Depends:
 debhelper-compat (= 13),
Standards-Version: 4.6.2
Homepage: https://github.com/michaelforney/samurai
#Vcs-Browser: https://salsa.debian.org/debian/samurai
#Vcs-Git: https://salsa.debian.org/debian/samurai.git

Package: samurai
Architecture: amd64
Depends:
 ${shlibs:Depends},
 ${misc:Depends},
Description: samurai is a ninja-compatible build tool written in C99 
 • with a focus on simplicity, speed, and portability.
 • samurai implements the ninja build language through version 1.9.0 except for MSVC dependency handling (deps = msvc).
 • It uses the same format for .ninja_log and .ninja_deps as ninja, currently version 5 and 4 respectively.
 • It is feature-complete and supports most of the same options as ninja. </code></pre></div><p>Create Debian source package </p><div class="codebox"><pre><code>dpkg-source -b . </code></pre></div><p>Build Debian binary package (deb)</p><div class="codebox"><pre><code>dpkg-buildpackage -us -uc -b </code></pre></div><div class="codebox"><pre><code>$ ls -1 ../*.deb
../samurai_1.9.0-1_amd64.deb
../samurai-dbgsym_1.9.0-1_amd64.deb </code></pre></div><p>Install samurai</p><div class="codebox"><pre><code>sudo dpkg -i ../samurai_1.9.0-1_amd64.deb </code></pre></div><div class="codebox"><pre><code>$ samu --version
1.9.0
$ man samu </code></pre></div><p>Build-Depends:</p><div class="codebox"><pre><code>$ objdump -p /usr/bin/samu | grep NEEDED
  NEEDED               libc.so.6

$ apt-file find /usr/lib/x86_64-linux-gnu/libc.so | grep dev
libc6-dev: /usr/lib/x86_64-linux-gnu/libc.so </code></pre></div><p>Now you can build wxMaxima with the help of samurai.</p><p>A static <strong>muon</strong> is not easy to compile on Devuan, but the newest version of static <strong>muon</strong> executable with embedded <strong>samurai</strong> is already available for download.</p><div class="codebox"><pre><code>$ ldd muon-v0.5.0-amd64-linux
	not a dynamic executable

$ file muon-v0.5.0-amd64-linux
muon-v0.5.0-amd64-linux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=1a2a3022413581300d66c86f02329ed4aa782022, stripped </code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (igorzwx)]]></author>
			<pubDate>Thu, 22 May 2025 07:27:07 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=55709#p55709</guid>
		</item>
	</channel>
</rss>
