makedeb


fluffychat-bin 1.18.0-0


Cute and easy to use matrix messenger. Secure and decentralized.

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for fluffychat-bin.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: The one with the braid (AUR) <the-one@with-the-braid.cf>

_pkgname=fluffychat
pkgname="${_pkgname}-bin"
pkgver=1.18.0
#https://packages.debian.org/sid/amd64/libstdc++6/download
_debpver=14-20240201-3
pkgrel=0
pkgdesc="Cute and easy to use matrix messenger. Secure and decentralized."
arch=('amd64')
url="https://fluffychat.im/"
license=('AGPL3')
depends=('libgtk-3-0' 'libjsoncpp25' 'libsecret-1-0' 'libolm3' 'xdg-user-dirs' 'zenity')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("fluffychat-${pkgver}.tar.gz::https://github.com/krille-chan/fluffychat/releases/download/v${pkgver}/fluffychat-linux-x64.tar.gz"
        "http://deb.debian.org/debian/pool/main/g/gcc-14/libstdc++6_${_debpver}_amd64.deb")
noextract=("libstdc++6_${_debpver}_amd64.deb" "${_pkgname}-${pkgver}.tar.gz")
sha256sums=('d72a696dfa00f746a714f486a8d3cdc779caf589c435998492250232fa7ab078'
            '745d84fbf5f97267c19c3109e91f96daa1bd9e44aadfd4bc2eef773bf15a5972')

prepare() {
  cd "${srcdir}"
  # extract archive
  mkdir -p "${_pkgname}-${pkgver}"
  bsdtar -xf "${_pkgname}-${pkgver}.tar.gz" -C "${_pkgname}-${pkgver}"
  # extract deb
  dpkg-deb -x "libstdc++6_${_debpver}_amd64.deb" "libstdc++6_${_debpver}_amd64"
}

package() {  
  cd "${srcdir}/${_pkgname}-${pkgver}"
  # creating directories
  install -dm755 ${pkgdir}/usr/{bin,lib,libexec/${_pkgname},share/{pixmaps,applications,doc/${_pkgname}}}

  # install
  install -m755 "${srcdir}/${_pkgname}-${pkgver}/${_pkgname}" "${pkgdir}/usr/libexec/${_pkgname}/"
  cp -r "${srcdir}/${_pkgname}-${pkgver}/data" "${pkgdir}/usr/share/${_pkgname}"
  cp -r "${srcdir}/${_pkgname}-${pkgver}/lib" "${pkgdir}/usr/lib/${_pkgname}"
  # missing library
  install -m644 "${srcdir}/libstdc++6_${_debpver}_amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0."* "${pkgdir}/usr/lib/${_pkgname}/libstdc++.so.6"

  # linking
  ln -s /usr/libexec/${_pkgname}/${_pkgname} ${pkgdir}/usr/bin/${_pkgname}
  ln -s /usr/share/${_pkgname} ${pkgdir}/usr/libexec/${_pkgname}/data
  ln -s /usr/lib/${_pkgname} ${pkgdir}/usr/libexec/${_pkgname}/lib
  ln -s /usr/share/${_pkgname}/flutter_assets/assets/favicon.png ${pkgdir}/usr/share/pixmaps/${_pkgname}.png
  ln -s /usr/share/${_pkgname}/flutter_assets/NOTICES.Z ${pkgdir}/usr/share/doc/${_pkgname}/NOTICES.Z

  # desktop entry
  cat > ${pkgdir}/usr/share/applications/${_pkgname}.desktop << EOF
[Desktop Entry]
Type=Application
Version=${pkgver}
Name=FluffyChat
Comment=Cute and easy to use (matrix) messenger. Secure and decentralized.
Exec=${_pkgname}
Icon=${_pkgname}
Terminal=false
StartupNotify=false
Categories=Network;InstantMessaging;Chat;
EOF
}

# vim: set sw=2 ts=2 et: