parlay

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

slstatus-9999.ebuild (1059B)


      1 # Copyright 1999-2023 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 IUSE=""
     16 
     17 DEPEND="x11-libs/libX11"
     18 RDEPEND="${DEPEND}"
     19 
     20 src_prepare() {
     21 	default
     22 
     23 	sed -i \
     24 		-e "/^CFLAGS/{s|=|+=|;s|-O. | |g}" \
     25 		-e "/^LDFLAGS/{s|=|+=|g;s|-s$| |g}" \
     26 		-e "s@/usr/X11R6/include@${EPREFIX}/usr/include/X11@" \
     27 		-e "s@/usr/X11R6/lib@${EPREFIX}/usr/lib@" \
     28 		-e "s@-I/usr/include@@" -e "s@-L/usr/lib@@" \
     29 		config.mk || die
     30 
     31 	restore_config config.h
     32 }
     33 
     34 src_compile() {
     35 	emake CC=$(tc-getCC) slstatus
     36 }
     37 
     38 src_install() {
     39 	emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
     40 
     41 	dodoc README
     42 
     43 	save_config config.h
     44 }
     45 
     46 pkg_postinst() {
     47 	einfo "This ebuild has support for user defined configs"
     48 	einfo "Please read this ebuild for more details and re-emerge as needed"
     49 }