parlay

yet another gentoo overlay
git clone https://git.parazyd.org/parlay
Log | Files | Refs | README

slstatus-9999.ebuild (1051B)


      1 # Copyright 1999-2025 Gentoo Authors
      2 # Distributed under the terms of the GNU General Public License v2
      3 
      4 EAPI=8
      5 
      6 inherit git-r3 savedconfig toolchain-funcs
      7 
      8 DESCRIPTION="lightweight status monitor for window managers which use WM_NAME (eg. dwm)"
      9 HOMEPAGE="https://git.suckless.org/slstatus"
     10 EGIT_REPO_URI="https://git.suckless.org/slstatus"
     11 
     12 LICENSE="ISC"
     13 SLOT="0"
     14 KEYWORDS=""
     15 
     16 DEPEND="x11-libs/libX11"
     17 RDEPEND="${DEPEND}"
     18 
     19 src_prepare() {
     20 	default
     21 
     22 	sed -i \
     23 		-e "/^CFLAGS/{s|=|+=|;s|-O. | |g}" \
     24 		-e "/^LDFLAGS/{s|=|+=|g;s|-s$| |g}" \
     25 		-e "s@/usr/X11R6/include@${EPREFIX}/usr/include/X11@" \
     26 		-e "s@/usr/X11R6/lib@${EPREFIX}/usr/lib@" \
     27 		-e "s@-I/usr/include@@" -e "s@-L/usr/lib@@" \
     28 		config.mk || die
     29 
     30 	restore_config config.h
     31 }
     32 
     33 src_compile() {
     34 	emake CC=$(tc-getCC) slstatus
     35 }
     36 
     37 src_install() {
     38 	emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
     39 
     40 	dodoc README
     41 
     42 	save_config config.h
     43 }
     44 
     45 pkg_postinst() {
     46 	einfo "This ebuild has support for user defined configs"
     47 	einfo "Please read this ebuild for more details and re-emerge as needed"
     48 }