You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
898 B

3 years ago
#!/bin/sh -eu
PREFIX=ALTLinux
cd "$WORKDIR/$PREFIX"
COMPS="$(find -mindepth 1 -maxdepth 1 -type d -name 'RPMS.*' -printf '%f\n' |
sed 's/^RPMS\.//')"
[ -z "$GLOBAL_VERBOSE" ] || echo "** COMPS=$COMPS" >&2
[ -n "$COMPS" ] || exit 1
for comp in $COMPS; do
for f in RPMS.$comp/*rpm; do
[ "$f" = "RPMS.$comp/$(rpm -qp $f).rpm" ] || mv $f RPMS.$comp/$(rpm -qp $f).rpm
done
done
# NB: bz2 still needed for apt-cdrom add to work
genbasedir \
--topdir="$WORKDIR" \
--no-oldhashfile \
--partial \
--xz \
--bz2 \
--create \
--notautomatic=false \
${INFO_ARCH:+--architecture="$INFO_ARCH"} \
${INFO_NAME:+--archive="$INFO_NAME"} \
${INFO_VERSION:+--version="$INFO_VERSION"} \
${INFO_ORIGIN:+--origin="$INFO_ORIGIN"} \
${INFO_LABEL:+--label="$INFO_LABEL"} \
$PREFIX $COMPS
### drop this when genbasedir is fixed (--no-uncompressed)
for c in $COMPS; do rm -f base/{pkg,src}list.$c; done