archrelease: copy trunk to community-any
[ArchLinux/community.git] / sniffnet / repos / community-x86_64 / PKGBUILD
blob78b0352f6ffcd73859dcf4caccef23b3b2a66c25
1 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
2 # Contributor: Matteo Giordano <mail at matteogiordano dot me>
3 # Contributor: qubidt <qubidt at gmail dot com>
5 pkgname=sniffnet
6 pkgver=1.2.0
7 pkgrel=1
8 pkgdesc="Application to comfortably monitor your network traffic"
9 arch=('x86_64')
10 url="https://github.com/GyulyVGC/sniffnet"
11 license=('Apache' 'MIT')
12 depends=('alsa-lib' 'fontconfig' 'libpcap' 'freetype2' 'glibc')
13 makedepends=('cargo')
14 install=$pkgname.install
15 source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz"
16         "${pkgname}.desktop")
17 sha512sums=('9ecc5882591c06c28ed9fb5b8006d248e7f507f2326c83dfe4a0cedf0323ad68d08e01594d7a7c19775098f7163444617b96ac554c28f7345c94513a01cf6a54'
18             '39d23f967ac05579d9bb87f2c5fcf961f760b0cfab1138253bcc8b22fd9964e27bc9ec6c42e8ed49a287ec5443bf352baf8dd4b4d063c2f6aa29c714d38da2a3')
19 options=('!lto')
21 prepare() {
22         cd "$pkgname-$pkgver"
23         cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
26 build() {
27         cd "$pkgname-$pkgver"
28         cargo build --frozen --release
31 check() {
32         cd "$pkgname-$pkgver"
33         cargo test --frozen
36 package() {
37         cd "$pkgname-$pkgver"
38         install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
39         install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
40         install -Dm 644 LICENSE-MIT -t "$pkgdir/usr/share/licenses/$pkgname"
41         install -Dm 644 "resources/logos/icon.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
42         install -Dm 644 "../${pkgname}.desktop" -t "$pkgdir/usr/share/applications"
45 # vim: ts=2 sw=2 et: