diff --git a/btrfs-progs.spec b/btrfs-progs.spec
index 404b56e..2a8aecd 100644
--- a/btrfs-progs.spec
+++ b/btrfs-progs.spec
@@ -1,3 +1,6 @@
+# Local definition of version_no_tilde when it doesn't exist
+%{!?version_no_tilde: %define version_no_tilde %{shrink:%(echo '%{version}' | tr '~' '-')}}
+
 # Disable for now until version handling question is dealt with
 %bcond_with python