Had the same question and @hnyman pointed me in the right direction, so this is part of the build script I'm using for my repo:
/SDK_ipq806x_17.01/scripts/ipkg-make-index.sh . 2>/dev/null > Packages.manifest
grep -vE '^(Maintainer|LicenseFiles|Source|Require)' Packages.manifest > Packages
gzip -9nc Packages > Packages.gz
/SDK_ipq806x_17.01/staging_dir/host/bin/usign -S -m Packages -s /SDK_ipq806x_17.01/my-repo.key
Needs to be run from the directory with *.ipk. I *think* you'll need to compile usign, the sources are in the SDK. You will then need to publish 4 Packages* files, just like here: https://github.com/stangri/openwrt-repo.