1 # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
2 source ${LBUILD_DIR}/lbuild-rhel
4 DEVEL_PATH_ARCH_DELIMETER="."
5 RPM_HELPERS_DIR="/usr/lib/rpm/openEuler"
6 # Pkg which contains ext4 source code
7 KERNEL_DEBUGINFO="kernel-debugsource-${lnxmaj}-${lnxrel}.${TARGET_ARCH}.rpm"
9 # force local definition of %dist into ~/.rpmmacros
10 # to avoid verbose extended strings like ".el9.centos"
11 # in kernel version and rpm names
13 grep '^%dist' $RMAC &> /dev/null || echo "%dist .${DISTRO/./}" >> $RMAC
15 kernel_debuginfo_location() {
16 local base_url="https://repo.openeuler.org"
17 local distro=${DISTRO^^}
18 # convert OEYYMM.SPx to openEuler-YY.MM-LTS-SPx
19 distro=$(echo $distro | sed -E -e 's/OE/openEuler-/' \
20 -e 's/([0-9]{2})([0-9]{2})/\1.\2-/' \
21 -e 's/.(SP[0-9]+)/LTS-\1/')
23 echo "${base_url}/${distro}/update/$TARGET_ARCH/Packages"
28 unpack_linux_devel_rpm-${DISTROMAJ}() {
29 local callers_rpm="\$1"
31 unpack_linux_devel_rpm-rhel "\$callers_rpm"
34 find_linux_rpm-${DISTROMAJ}() {
36 local wanted_kernel="\$2"
37 local pathtorpms=\${3:-"\$KERNELRPMSBASE/\$lnxmaj/\$DISTROMAJ/\$TARGET_ARCH"}
39 find_linux_rpm-rhel "\$prefix" "\$wanted_kernel" "\$pathtorpms"