#|/bin/cygport # lesspipe.cygport - lesspipe Cygwin package build control script definitions NAME=lesspipe VERSION=2.13 RELEASE=1 CATEGORY=Text SUMMARY="less pager input file preprocessor" DESCRIPTION="Converts many file formats to text with coloured or enhanced display, so their contents or useful information about their contents can be shown. See the less(1) man page section INPUT PREPROCESSOR. The input filter is a bash script, which also works under zsh, and is easily extensible for new formats. Tab completion mechanisms for archive contents are provided for bash and zsh. Also works with git version control, mutt mail client, vim text editor. Can handle a wide variety of file formats, even files compressed and contained in a hierarchy of archives, enabling users to deeply inspect archives, and display the contents of files in archives without having to unpack them. Converters are checked for and used if available, including Cygwin packages: antiword MS Word files binutils text strings in binary files or archives brotli compressed files or archives bsdtar archive files bzip2 compressed files or archives cabextract MS Cabinet files catdoc MS Word files cpio archive files djvulibre DjVu files genisoimage ISO files or images ghostscript PS files groff man pages or Unix source documents gzip compressed files or archives hdf5 HDF v5 files id3v2 media files ImageMagick image files jq JSON data files libiconv character set code page conversion lynx HTML files lz4 compressed files or archives lzip compressed files or archives mediainfo media files netcdf nc4 NetCDF files odt2txt OpenDocument files openssl Digital Security Certificates p7zip archive files perl-Image-ExifTool media files poppler PDF files python39-pygments program source code files rpm RPM files source-highlight program source code files texlive TeX files unrtf RTF files unzip zip files util-linux tabular data files w3m HTML files wordview MS Office files writerperfect MS Office files wv MS Word files xlsx2csv MS Excel files xz compressed files or archives zstd compressed files or archives. To use these, select them for install in the Cygwin Setup program." SITE=https://www-zeuthen.desy.de/~friebel/unix HOMEPAGE=https://github.com/wofr06/$NAME HOMEPAGE=$SITE/lesspipe.html SRC_URI=$SITE/less/$NAME-$VERSION.tar.gz SRC_URI=https://github.com/wofr06/$NAME/archive/refs/tags/v$VERSION.tar.gz#/$NAME-$VERSION.tar.gz GIT_URI=https://github.com/wofr06/$NAME/archive/refs/tags/v$VERSION.tar.gz PATCH_URI=lesspipe-2.13-lesspipe.sh-fix-xls2csv-iconv-groff.patch ARCH=noarch DEPEND="bash zsh" # supported shells DEPEND+=" git libiconv less mutt vim perl" # apps for tests and converters DEPEND+=" antiword binutils brotli bsdtar bzip2 cabextract catdoc cpio" DEPEND+=" djvulibre genisoimage ghostscript groff gzip hdf5 id3v2 ImageMagick" DEPEND+=" jq lynx lz4 lzip mediainfo netcdf odt2txt openssl" DEPEND+=" p7zip perl-Archive-Zip perl-Image-ExifTool poppler python39-pygments" DEPEND+=" rpm source-highlight texlive unrtf unzip util-linux" DEPEND+=" w3m wordview writerperfect wv xlsx2csv xz zstd" BUILD_REQUIRES="$DEPEND" unset DEPEND REQUIRES="less libiconv perl-Archive-Zip" # iconv for code page conversions LICENSE=GPL-2.0-or-later LICENSE_SPDX="SPDX-License-Identifier: $LICENSE" # SPDX-License-Identifier: GPL-2.0-or-later LICENSE_URI=COPYING DIFF_EXCLUDES=$C/profile.d.sh src_compile() { cd $S # cygautoreconf lndirs cd $B # cygconf ./configure --prefix=/usr cygmake } src_install() { cd $B # install -D "${srcdir}"/lesspipe.sh "${pkgdir}"/etc/profile.d/lesspipe.sh # verbose cp lesspipe.sh $C/profile.d.sh # In bash, please preload the completion, dynamic invocation does not work # . /usr/share/bash-completion/less_completion # Or consider installing the file less_completion in /etc/bashcompletion.d [sic] dodir /etc/bash_completion.d insinto /etc/bash_completion.d doins less_completion cyginstall verbose rm -f $D/usr/share/bash-completion/less_completion } CYGWIN_MAINTAINER=Brian%20Inglis CYGWIN_MAINTAINER_EMAIL=Brian.Inglis@SystematicSW.ab.ca UPSTREAM_MAINTAINER=Wolfgang%20P.%20Friebel UPSTREAM_MAINTAINER_EMAIL=WP.Friebel@Gmail.com SUBJECT=${OSTYPE^}%20Package%20$NAME%20$VERSION MAILTO=mailto:$UPSTREAM_MAINTAINER%20%3C$UPSTREAM_MAINTAINER_EMAIL%3E\ ?from=$CYGWIN_MAINTAINER%20%3C$CYGWIN_MAINTAINER_EMAIL%3E\ \&subject=$SUBJECT\&body=$SUBJECT