version: 2
project_name: watchyourlan
builds:
  - main: ./cmd/WatchYourLAN/
    binary: watchyourlan
    id: default
    env: [CGO_ENABLED=0]
    goos:
      - linux
    goarch:
      - 386
      - amd64
      - arm
      - arm64
    goarm:
      - "5"
      - "6"
      - "7"

nfpms:
  - id: systemd
    formats:
    - deb
    - rpm
    maintainer: aceberg <aceberg_a@proton.me>
    description: Lightweight network IP scanner with web GUI 
    homepage: https://github.com/aceberg/watchyourlan
    license: MIT
    section: utils
    dependencies: # Don't forget to edit!
    - arp-scan
    - tzdata
    contents:
    - src: ./configs/watchyourlan.service
      dst: /lib/systemd/system/watchyourlan.service
    scripts:
      postinstall: ./configs/postinstall.sh

  - id: alpine
    formats:
    - apk
    maintainer: aceberg <aceberg_a@proton.me>
    description: Lightweight network IP scanner with web GUI 
    homepage: https://github.com/aceberg/watchyourlan
    license: MIT
    section: utils
    dependencies: # Don't forget to edit!
    - arp-scan
    - tzdata
    contents:
    - src: ./configs/watchyourlan
      dst: /etc/init.d/watchyourlan

archives:
  - files:
    - LICENSE
    - src: ./configs/watchyourlan.service
      dst: watchyourlan.service
    - src: ./configs/install.sh
      dst: install.sh
    wrap_in_directory: true
    format_overrides:
    - goos: windows
      format: zip

checksum:
  name_template: "checksums.txt"
