🔒 Repository is read-only – file editing is disabled.

recipes/core/lsb-release/PAGBUILD.yaml main

46 linii Raw ← Powrót
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
pkgname: 'lsb-release'
pkgver: '1.4'
pkgrel: '3'
pkgdesc: 'Provides informations about LSB status (Linux Standards Base) of the distribution.'
url: 'https://www.linuxbase.org/'
arch: x86_64
depends: []
makedepends: []

build: |
  # Upstream lsb-release 1.4 zniknął z sieci (404 na sourceforge) – dostarczamy
  # własny, minimalny odpowiednik czytający /etc/os-release.
  mkdir -p ${PKGDIR}/usr/bin
  cat > ${PKGDIR}/usr/bin/lsb_release << "EOF"
  #!/bin/sh
  if [ -r /etc/os-release ]; then
      . /etc/os-release
  elif [ -r /etc/lsb-release ]; then
      . /etc/lsb-release
  fi
  : "${ID:=PaganOS}"
  : "${PRETTY_NAME:=PaganOS Linux}"
  : "${VERSION_ID:=rolling}"
  : "${VERSION_CODENAME:=-}"
  case "$1" in
      -a|--all)
          echo "Distributor ID: $ID"
          echo "Description:    $PRETTY_NAME"
          echo "Release:        $VERSION_ID"
          echo "Codename:       $VERSION_CODENAME" ;;
      -i|--id)              echo "$ID" ;;
      -d|--description)     echo "$PRETTY_NAME" ;;
      -r|--release)         echo "$VERSION_ID" ;;
      -c|--codename)        echo "$VERSION_CODENAME" ;;
      -s|--short)           echo "$PRETTY_NAME" ;;
      -h|--help)
          echo "Użycie: lsb_release [opcje]"
          echo "  -a  wszystkie informacje"
          exit 0 ;;
      *) echo "Użycie: lsb_release [opcje]"; exit 1 ;;
  esac
  EOF
  chmod 755 ${PKGDIR}/usr/bin/lsb_release

package: |
  true