suckless-extra

A collection of gentoo ebuilds for suckless programs as well as their dependencies and setup scripts
git clone git://git.stellar-nexus.ru/suckless-extra
Log | Files | Refs

sdhcp-0.1.ebuild (677B)


      1 # Copyright 2024 Gentoo Authors
      2 # Distributed under the terms of the GNU General Public License v2
      3 
      4 EAPI=8
      5 
      6 inherit toolchain-funcs
      7 
      8 DESCRIPTION="simple dhcp client"
      9 HOMEPAGE="https://core.suckless.org/sdhcp
     10 https://git.2f30.org/sdhcp/files.html"
     11 SRC_URI="https://dl.2f30.org/releases/${P}.tar.gz"
     12 
     13 S="${WORKDIR}"/"${PN}"
     14 
     15 LICENSE="MIT"
     16 SLOT="0"
     17 KEYWORDS="~amd64"
     18 
     19 src_unpack() {
     20 	cd "${WORKDIR}"
     21 	tar xf "${WORKDIR}"/../distdir/"${P}".tar.gz
     22 }
     23 
     24 src_prepare() {
     25 	default
     26 
     27 	sed -i \
     28 		-e "/^\(LDFLAGS\|CFLAGS\|CPPFLAGS\)/{s| = | += |g;s|-s ||g}" \
     29 		config.mk
     30 }
     31 
     32 src_compile() {
     33 	emake CC="$(tc-getCC)"
     34 }
     35 
     36 src_install() {
     37 	emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
     38 }