return 1
}
+# Return a numeric version code based on a version string. The version
+# code is useful for comparison two version strings to see which is newer.
+version_code() {
+ # split arguments like "0.8.0" into "0", "8", "0"
+ eval set -- $(tr "[:punct:]" " " <<< $*)
+ echo -n "$((($1 << 16) | ($2 << 8) | $3))"
+}
+
uniqify() {
echo $(echo "$*" | xargs -n 1 | sort -u)
# The spl/zfs spec files expect RPM_BUILD_ROOT to point to the root of the
# destination for the rpms
export RPM_BUILD_ROOT=$TOPDIR
- SPLZFSVER=${SPLZFSVER:-0.7.13}
+ SPLZFSVER=${SPLZFSVER:-0.8.3}
SPLZFSTAG=${SPLZFSTAG:-}
# "spl zfs" prior to 0.8.0
# "zfs" for 0.8.0 and later
- SPLZFSPKGS="spl zfs"
+ (( $(version_code $SPLZFSVER) < $(version_code 0.8.0) )) &&
+ SPLZFSPKGS="spl zfs" || SPLZFSPKGS="zfs"
# The files expect a kver to be set to the kernel version .
local kver=$(find_linux_release)