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

xscreenshot-1.0.ebuild (848B)


      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 flag-o-matic
      7 
      8 DESCRIPTION="screen capture tool"
      9 HOMEPAGE="https://git.codemadness.org/xscreenshot/file/README.html"
     10 
     11 if [[ ${PV} == 9999 ]]; then
     12 	inherit git-r3
     13 	EGIT_REPO_URI="git://git.codemadness.org/xscreenshot"
     14 else
     15 	SRC_URI="https://gentoo.stellar-nexus.ru/${PN}/${P}.tar.gz"
     16 	KEYWORDS="~amd64"
     17 fi
     18 
     19 LICENSE="MIT"
     20 SLOT="0"
     21 
     22 DEPEND="x11-libs/libX11"
     23 RDEPEND="${DEPEND}"
     24 
     25 src_prepare() {
     26 	default
     27 
     28 	sed -i \
     29 		-e '/^INCS/{s:/usr/X11R6/include:/usr/include/X11:}' \
     30 		-e "/^LIBS/{s:/usr/X11R6/lib:/usr/$(get_libdir)/X11:}" \
     31 		Makefile || die
     32 }
     33 
     34 src_compile() {
     35 	filter-flags -Wl,--as-needed
     36 	emake CC="$(tc-getCC)"
     37 }
     38 src_install() {
     39 	emake DESTDIR="${D}" PREFIX="${EPREFIX}" MANPREFIX="/usr/share/man" install
     40 }