From repocop@altlinux.org Thu Mar 12 02:29:02 MSK 2026
From: "Repocop Q. A. Robot" <repocop@altlinux.org>

Subject: repocop NMU

- NMU (by repocop). See http://www.altlinux.org/Tools/Repocop
- applied repocop fixes:
  * backup-file-in-package for domoticz
  * postclean-03-private-rpm-macros for the spec file

--- a/domoticz.spec	2026-03-12 02:29:02.752157715 +0300
+++ b/domoticz.spec	2026-03-12 02:29:02.752157715 +0300
@@ -77,7 +77,7 @@
 %patch4 -p1
 
 # Add support for future versions of Python by replacing hardcoded version with macro
-%__subst 's/-lpythonVER/-lpython%__python3_version/' CMakeLists.txt
+sed -i 's/-lpythonVER/-lpython%__python3_version/' CMakeLists.txt
 cp -p %SOURCE3 ./appversion.h
 
 %build
@@ -173,6 +173,12 @@
 ln -s %_sharedstatedir/%name/templates \
 %buildroot%_datadir/%name/www/templates
 
+# It is the file in the package whose name matches the format emacs or vim uses 
+# for backup and autosave files. It may have been installed by  accident.
+find $RPM_BUILD_ROOT \( -name '.*.swp' -o -name '#*#' -o -name '*~' \) -print -delete
+# failsafe cleanup if the file is declared as %%doc
+find . \( -name '.*.swp' -o -name '#*#' -o -name '*~' \) -print -delete
+
 
 %pre
 groupadd -f -r domoticz
