kind: autotools

depends:
- filename: gnu-toolchain.bst
  type: build
- filename: core/pkg-config.bst
  type: build
- filename: core/util-linux.bst
  type: build
- filename: core/file.bst
  type: build

sources:
- kind: git
  url: upstream:e2fsprogs
  track: v1.43.7
  ref: 3427917edca335d2cc4258cff8ab105c840298a4

config:
  configure-commands:
  - |
    ./configure --prefix="%{prefix}" --sysconfdir=/etc \
      --disable-libuuid --disable-uuidd --disable-libblkid
  build-commands:
  - make CFLAGS="-g -O2 -DHAVE_CONFIG_H -fPIC"
  install-commands:
  - |
    td="$(mktemp -d)"
    make DESTDIR="$td" install
    make DESTDIR="$td" install-libs
    find "$td" \( -name blkid -o -name findfs -o \) -delete
    find "$td" \( -name blkid.8 -o -name findfs.8 \) -delete
    mv "$td"/* "%{install-root}"
