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

spt-0.6.ebuild (934B)


      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 savedconfig
      7 
      8 DESCRIPTION="simple pomodoro timer"
      9 HOMEPAGE="https://github.com/pickfire/spt"
     10 SRC_URI="https://github.com/pickfire/spt/archive/refs/heads/master.tar.gz -> ${P}.tar.gz"
     11 
     12 S="${WORKDIR}/${PN}-master"
     13 
     14 LICENSE="MIT"
     15 SLOT="0"
     16 KEYWORDS="~amd64"
     17 IUSE="libnotify"
     18 
     19 DEPEND="
     20 	libnotify? ( x11-libs/libnotify x11-libs/libX11 )
     21 	x11-libs/libX11"
     22 RDEPEND="${DEPEND}"
     23 
     24 src_prepare() {
     25 	default
     26 
     27 	use libnotify ||
     28 	sed -i \
     29 		-e "s/DEFS/#DEFS/g" \
     30 		-e "s/INCS+=/#INCS+=/g" \
     31 		-e "s/LIBS+=/#LIBS+=/g" \
     32 		config.mk
     33 	sed -i \
     34 		-e "s/ -Os / /" \
     35 		-e "/^\(LDFLAGS\|CFLAGS\|CPPFLAGS\)/{s| = | += |g;s|-s ||g}" \
     36 		config.mk
     37 
     38 	restore_config config.def.h
     39 }
     40 
     41 src_compile() {
     42 	emake CC="$(tc-getCC)" spt
     43 }
     44 
     45 src_install() {
     46 	emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
     47 
     48 	save_config config.def.h
     49 }