12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- # Build recipe for pygments.
- #
- # Copyright (C) 2022 Matias Fonzo, <selk@dragora.org>.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- # Exit immediately on any error
- set -e
- program=pygments
- version=2.3.0
- pkgname=ruby-${program}
- release=1
- # Define a category for the output of the package name
- pkgcategory=ruby
- tarname=${program}.rb-${version}.gem
- # Remote source(s)
- fetch=https://rubygems.org/downloads/$tarname
- description="
- A Ruby wrapper for Pygments syntax highlighter.
- pygments.rb is a Ruby wrapper for Pygments syntax highlighter.
- "
- homepage=https://github.com/pygments/pygments.rb
- license=MIT
- build()
- {
- # Figure out directory for Ruby Gems
- _gemdir="$(ruby -W0 -e 'puts Gem.default_dir')"
- if test -z "_$gemdir"
- then
- echo "recipe: Error: the _gemdir variable is empty." 1>&2
- exit 1
- fi
- mkdir -p "${destdir}/${_gemdir}" "${destdir}/usr/bin"
- gem install \
- --ignore-dependencies \
- --no-user-install \
- --backtrace --verbose \
- --install-dir "${destdir}/${_gemdir}" \
- --bindir "${destdir}/usr/bin" \
- "${tardir}/$tarname"
- }
|