Patch2: %{name}-python.patch
Patch3: no-git.patch
Patch4: boost-1.73.patch
+Patch5: %{name}-gpio.patch
BuildRequires: boost-devel >= 1.66.0
BuildRequires: cereal-devel
BuildRequires: cmake >= 3.16.0
BuildRequires: pkgconfig
BuildRequires: python3 >= 1:3.4
BuildRequires: python3-devel >= 1:3.4
+BuildRequires: rpmbuild(macros) >= 1.644
BuildRequires: sqlite3-devel
BuildRequires: tinyxml-devel
BuildRequires: tinyxpath-devel
Requires(post,preun,postun): systemd-units >= 38
Requires: fonts-TTF-Google-Droid
Requires: libopenzwave >= 1.5.0
+Provides: group(domoticz)
+Provides: user(domoticz)
%description
Domoticz is a Home Automation System that lets you monitor and
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
APPVERSION="%{version}"
echo "#define APPVERSION ${APPVERSION##*.}" > appversion.h
rm -rf $RPM_BUILD_ROOT
%pre
-getent group domoticz >/dev/null || groupadd -r domoticz
-getent passwd domoticz >/dev/null || \
-useradd -r -g domoticz -d %{_datadir}/%{name} -s /sbin/nologin \
--c "Domoticz Home Automation Server" domoticz
-# For OpenZWave USB access (/dev/ttyACM#)
-usermod -G domoticz,dialout domoticz
+%groupadd -g 342 domoticz
+%useradd -u 342 -r -d %{_datadir} -s /bin/false -c "Domoticz Home Automation Server" -G dialout -g domoticz domoticz
%post
%systemd_post %{name}.service
%systemd_preun %{name}.service
%postun
+if [ "$1" = "0" ]; then
+ %userremove mpd
+ %groupremove mpd
+fi
%systemd_reload
%files