<?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=4267&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] Building .deb package from git source]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=4267</link>
		<description><![CDATA[The most recent posts in [SOLVED] Building .deb package from git source.]]></description>
		<lastBuildDate>Thu, 15 Apr 2021 15:14:36 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29148#p29148</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>Yes, that&#039;s right.</p><p>Here&#039;s mine:</p><div class="codebox"><pre><code>COM =\
        components/battery\
        components/datetime\
        components/load_avg</code></pre></div><p>I also cut up the load_avg component so that it only displays the first value (from the last minute) <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></div></blockquote></div><p>Got it down to this.</p><p><span class="bbc">-rwxr-xr-x 1 root root 23336 Apr 15 22:14 /usr/bin/slstatus</span></p><div class="codebox"><pre><code>REQ = util
COM =\
        components/battery\
        components/datetime\
        components/run_command\
        components/volume\</code></pre></div><p>Thanks for the tips.</p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Thu, 15 Apr 2021 15:14:36 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29148#p29148</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29146#p29146</link>
			<description><![CDATA[<p>Yes, that&#039;s right.</p><p>Here&#039;s mine:</p><div class="codebox"><pre><code>COM =\
        components/battery\
        components/datetime\
        components/load_avg</code></pre></div><p>I also cut up the load_avg component so that it only displays the first value (from the last minute) <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Thu, 15 Apr 2021 15:00:25 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29146#p29146</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29145#p29145</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>Did you remove the unwanted stuff from the components directory and delete the lines relating to them in the Makefile? That reduces the size of the binary considerably.</p></div></blockquote></div><p><del><br />so just delete the components not needed in the Makefile as well? </del></p><p>wouldnt deleting the lines in the makefile be enough?</p><p>eg;</p><div class="codebox"><pre><code>REQ = util
COM =\
        components/battery\
        components/cpu\
        components/datetime\
        components/disk\
        components/entropy\
        components/hostname\
        components/ip\
        components/kernel_release\
        components/keyboard_indicators\
        components/keymap\
        components/load_avg\
        components/netspeeds\
        components/num_files\
        components/ram\
        components/run_command\
        components/separator\
        components/swap\
        components/temperature\
        components/uptime\
        components/user\
        components/volume\
        components/wifi</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Thu, 15 Apr 2021 14:58:25 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29145#p29145</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29144#p29144</link>
			<description><![CDATA[<p>Did you remove the unwanted stuff from the components directory and delete the lines relating to them in the Makefile? That reduces the size of the binary considerably.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Thu, 15 Apr 2021 14:54:31 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29144#p29144</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29143#p29143</link>
			<description><![CDATA[<p>ive got volume via dev/mixer and cpu temp which bumps my settings up somewhat.</p><p><span class="bbc">-rwxr-xr-x 1 root root 31784 Apr 15 22:14 /usr/bin/slstatus</span></p><div class="codebox"><pre><code>static const struct arg args[] = {
        /* function format          argument */
        { vol_perc,     &quot; V: %s % | &quot;,          &quot;/dev/mixer&quot; },
        { run_command, &quot; C: %s | &quot; ,            &quot;/home/dice/bin/temp&quot; },
        { battery_perc,  &quot;B: %2s %% | &quot;,      &quot;BAT1&quot;           },
        { datetime, &quot;T: %s&quot;,           &quot;%R&quot; },
};</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Thu, 15 Apr 2021 14:49:50 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29143#p29143</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29141#p29141</link>
			<description><![CDATA[<div class="quotebox"><cite>dice wrote:</cite><blockquote><div><p>What features does your package have as default settings?</p></div></blockquote></div><p>I cut the guts out of the suckless original, here&#039;s my de-commented config.def.h:</p><div class="codebox"><pre><code>const unsigned int interval = 1000;

static const char unknown_str[] = &quot;n/a&quot;;

#define MAXLEN 2048

static const struct arg args[] = {
   { load_avg,     &quot; %s  •  &quot;, NULL },
   { battery_perc, &quot;%s&quot;,       &quot;BAT0&quot; },
   { datetime,     &quot;%s&quot;,       &quot;%  •  %F  •  %T&quot; },
};</code></pre></div><p>I also removed the unwanted components and associated lines in the Makefile.</p><p>The resultant binary is tiny:</p><div class="codebox"><pre><code>-rwxr-xr-x 1 root root 22656 May 12  2019 /usr/bin/slstatus</code></pre></div><p>But the memory usage is about the same as a (dash) shell script:</p><div class="codebox"><pre><code>268.0 KiB + 338.0 KiB = 606.0 KiB       status
240.0 KiB + 392.0 KiB = 632.0 KiB       slstatus</code></pre></div><p><em>*shrugs*</em></p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Thu, 15 Apr 2021 14:42:57 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29141#p29141</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29139#p29139</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>The best way to create .deb packages is with the <span class="bbc">debmake</span> command.</p><div class="quotebox"><cite>dice wrote:</cite><blockquote><div><p>any good tutorials</p></div></blockquote></div><p>Have you seen <a href="https://www.debian.org/doc/manuals/debmake-doc/" rel="nofollow">https://www.debian.org/doc/manuals/debmake-doc/</a>?</p><p>I made a package for slstatus a while ago, here&#039;s a link to my debian directory tarball: <a href="https://download.opensuse.org/repositories/home:/Head_on_a_Stick:/debian_desktop/Debian_10/slstatus_0.1-2.debian.tar.xz" rel="nofollow">https://download.opensuse.org/repositor … ian.tar.xz</a></p><div class="quotebox"><cite>dice wrote:</cite><blockquote><div><div class="codebox"><pre><code>       ln -s slstatus.1.gz debian/slstatus/usr/share/man/man1/slstatus.default.1.gz</code></pre></div></div></blockquote></div><p>Was the man page not installed automatically by dh_installman(1)?</p><p>EDIT: corrected download link.</p></div></blockquote></div><p>Thanks.</p><p>I fear any package for slstatus will be mostly personal via source, but its good to have a binary for easy installation. What features does your package have as default settings?</p><p>The default debian/rules were not enough to successfully build the deb so i borrowed the rules from apt source dwm and modified to suit. It would have picked up man page with dh_installman i suppose.</p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Thu, 15 Apr 2021 14:16:17 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29139#p29139</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29137#p29137</link>
			<description><![CDATA[<p>The best way to create .deb packages is with the <span class="bbc">debmake</span> command.</p><div class="quotebox"><cite>dice wrote:</cite><blockquote><div><p>any good tutorials</p></div></blockquote></div><p>Have you seen <a href="https://www.debian.org/doc/manuals/debmake-doc/" rel="nofollow">https://www.debian.org/doc/manuals/debmake-doc/</a>?</p><p>I made a package for slstatus a while ago, here&#039;s a link to my debian directory tarball: <a href="https://download.opensuse.org/repositories/home:/Head_on_a_Stick:/debian_desktop/Debian_10/slstatus_0.1-2.debian.tar.xz" rel="nofollow">https://download.opensuse.org/repositor … ian.tar.xz</a></p><div class="quotebox"><cite>dice wrote:</cite><blockquote><div><div class="codebox"><pre><code>       ln -s slstatus.1.gz debian/slstatus/usr/share/man/man1/slstatus.default.1.gz</code></pre></div></div></blockquote></div><p>Was the man page not installed automatically by dh_installman(1)?</p><p>EDIT: corrected download link.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Thu, 15 Apr 2021 13:50:23 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29137#p29137</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29132#p29132</link>
			<description><![CDATA[<p>can see the new marked SOLVED link in op too, nice addition admin.</p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Thu, 15 Apr 2021 12:45:27 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29132#p29132</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29131#p29131</link>
			<description><![CDATA[<p>Thanks for the hints. Figured it out somewhat from dwm apt source.</p><p><span class="bbc">slstatus-1.0/debian/rules </span></p><div class="codebox"><pre><code>#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

SHELL := sh -e

%:
        dh ${@}

override_dh_auto_clean:
        rm -f config.h
        $(MAKE) clean

override_dh_auto_install:
        $(MAKE) install DESTDIR=$(CURDIR)/debian/slstatus PREFIX=/usr

        mv debian/slstatus/usr/bin/slstatus debian/slstatus/usr/bin/slstatus.default
        ln -s slstatus.1.gz debian/slstatus/usr/share/man/man1/slstatus.default.1.gz</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Thu, 15 Apr 2021 12:40:11 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29131#p29131</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29130#p29130</link>
			<description><![CDATA[<p>&quot;is there any good tutorials&quot;, Nope<br />There is like no tutes on writing a deb that I can find.</p><p>To me it&#039;s looking for a directory to include in the deb.</p><div class="codebox"><pre><code>dh_usrlocal: debian/slstatus/usr/local/bin/slstatus is not a directory</code></pre></div><p>I&#039;d say you need to add in your rules file to create it</p><div class="codebox"><pre><code>mkdir -vp debian/slstatus/usr/local/bin</code></pre></div><p>/usr/local/bin/slstatus only makes sense to me as a program, not a directory</p><p>Good luck<br />It&#039;s a matter of play to get it working</p>]]></description>
			<author><![CDATA[dummy@example.com (ShorTie)]]></author>
			<pubDate>Thu, 15 Apr 2021 11:17:18 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29130#p29130</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29129#p29129</link>
			<description><![CDATA[<p>Whenever I get stuck like this I create the directories... and re-run the command.</p><p>use </p><div class="codebox"><pre><code>locate debian/slstatus/usr/local/bin/slstatus</code></pre></div><p>work your way back from there...</p><p>create directory...</p><div class="codebox"><pre><code>mkdir debian/slstatus/usr/local/bin/slstatus</code></pre></div><p>See if that helps. Sometimes it&#039;s a permission to write by the program.</p><p>see how you go.</p>]]></description>
			<author><![CDATA[dummy@example.com (GlennW)]]></author>
			<pubDate>Thu, 15 Apr 2021 10:44:38 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29129#p29129</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] Building .deb package from git source]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29128#p29128</link>
			<description><![CDATA[<p>Im wanting to have a try at creating .deb for the slstatus package but not sure how. </p><p>Could i just git clone slstatus and use dh_make from there or would be better off downloading the tar?</p><p>I successfully created a .deb of a shell script but a git repo is a bit daunting, is there any good tutorials for this type of build? </p><p>Edit: Ive read the f&#039;ing manual but still confused im stuck at debian/rules</p><div class="codebox"><pre><code>dh_usrlocal: debian/slstatus/usr/local/bin/slstatus is not a directory
make: *** [debian/rules:18: binary] Error 25
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Thu, 15 Apr 2021 09:49:12 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29128#p29128</guid>
		</item>
	</channel>
</rss>
