#! /bin/bash # libverto # Source: https://github.com/npmccallum/libverto/archive/0.3.1.tar.gz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: libevent, libev # Recommended: NONE # Optional: tevent autoreconf -iv && ./configure \ --prefix=/usr \ --with-libev \ --with-libevent $BUILDTRUPLE && read -p "Compile?" && make -j2 && sudo -S make DESTDIR=$BUILD install && cd $BUILD && sudo -S mkdir -v ${BUILD}/install && cat > /tmp/slack-desc << "EOF" # HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| libverto: libverto libverto: libverto: libverto provides a loop-neutral async api which allows the library libverto: to expose asynchronous interfaces and offload the choice of the main libverto: loop to the application. libverto: libverto: Homepage: https://github.com/latchset/libverto libverto: libverto: libverto: EOF sudo -S mv -v /tmp/slack-desc install/ && # Fix pkgconfig file since $exec_prefix is defined after use: cat > /tmp/libverto.pc << "EOF" prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libverto Description: Event loop abstraction interface Version: 0.3.1 Libs: -L${libdir} -lverto Cflags: -I${includedir} Libs.private: -ldl EOF sudo -S mv /tmp/libverto.pc usr/lib/pkgconfig/libverto.pc && sudo -S makepkg -l y -c n $PKGS/libverto-0.3.1-$(uname -m)-mlfs.txz && sudo -S rm -rf ${BUILD}/*