X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=PKGBUILD;h=e1995a4caa0db275a3e14f60286636a386760930;hb=c5b97b9a4779d9307ebf9a21ded89fce9be19444;hp=ff5e10ca18e6f354421a56e5c2c10edfddae499a;hpb=d24ea821b52ab30087241873c32001f64cbbd76d;p=perso%2FImmae%2FConfig%2FAUR.git diff --git a/PKGBUILD b/PKGBUILD index ff5e10c..e1995a4 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -25,13 +25,30 @@ pkgver() { } prepare() { + local file cd "${srcdir}/${_pkgname}" - patch -p1 -i ../scrollback.patch # http://st.suckless.org/patches/st-scrollback.diff sed \ -e '/char font/s/= .*/= "Fixed:pixelsize=13:style=SemiCondensed";/' \ -e '/char worddelimiters/s/= .*/= " '"'"'`\\\"()[]{}<>|";/' \ -e '/int defaultcs/s/= .*/= 1;/' \ -i config.def.h + sed \ + -e 's/CPPFLAGS =/CPPFLAGS +=/g' \ + -e 's/CFLAGS =/CFLAGS +=/g' \ + -e 's/LDFLAGS =/LDFLAGS +=/g' \ + -e 's/_BSD_SOURCE/_DEFAULT_SOURCE/' \ + -i config.mk + sed '/@tic/d' -i Makefile + for file in "${source[@]}"; do + if [[ "$file" != *.diff ]]; then + # add config.h if present in source array + # Note: this supersedes the above sed to config.def.h + [[ "$file" == "config.h" ]] && cp "$SRCDEST/$file" . + continue + fi + # add all patches present in source array + patch -Np1 <"$SRCDEST/$file" + done } build() { @@ -41,9 +58,8 @@ build() { package() { cd "${srcdir}/${_pkgname}" - export TERMINFO="${pkgdir}/usr/share/terminfo" - install -d "$TERMINFO" make PREFIX=/usr DESTDIR="${pkgdir}" install install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm644 README "${pkgdir}/usr/share/doc/${pkgname}/README" + tic -s -o "${pkgdir}/usr/share/terminfo" st.info }