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

xbmouse-0.1.ebuild (836B)


      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="simply bind a mouse button to a command"
      9 HOMEPAGE="https://github.com/vlaadbrain/xbmouse"
     10 SRC_URI="https://github.com/vlaadbrain/xbmouse/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 
     18 DEPEND="x11-libs/libX11"
     19 RDEPEND="${DEPEND}"
     20 
     21 src_prepare() {
     22 	default
     23 
     24 	sed -i \
     25 		-e "s/ -O0 / /" \
     26 		-e "/^\(LDFLAGS\|CFLAGS\|CPPFLAGS\)/{s| = | += |g;s|-s ||g}" \
     27 		-e "/^X11LIB/{s:/usr/X11R6/lib:/usr/$(get_libdir)/X11:}" \
     28 		-e "/^X11INC/{s:/usr/X11R6/include:/usr/include/X11:}" \
     29 		config.mk || die
     30 }
     31 
     32 src_compile() {
     33 	emake CC="$(tc-getCC)" xbmouse
     34 }
     35 
     36 src_install() {
     37 	emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
     38 }