Name: robotino-daemons Version: 2.0.17 Release: 3 Summary: Middleware components for Robotino License: see /usr/share/doc/robotino-daemons/copyright Distribution: Debian Group: Converted/base Source0: robotino-daemons_2.0.17_amd64.deb BuildArch: x86_64 BuildRequires: dpkg %description repackaging deb package to rpm %prep rm -drf %{_builddir}/robotino_daemons mkdir %{_builddir}/robotino_daemons dpkg-deb -x %{SOURCE0} %{_builddir}/robotino_daemons rm %{_builddir}/robotino_daemons/etc/systemd/system/restapid.service rm %{_builddir}/robotino_daemons/opt/robotino/bin/restapid rm %{_builddir}/robotino_daemons/etc/robotino/realsensed.conf rm %{_builddir}/robotino_daemons/opt/robotino/DAEMONS_CHANGELOG.txt rm %{_builddir}/robotino_daemons/opt/robotino/bin/realsensed rm %{_builddir}/robotino_daemons/etc/udev/rules.d/99-camd2.rules rm %{_builddir}/robotino_daemons/etc/udev/rules.d/99-wlan* rm %{_builddir}/robotino_daemons/etc/udev/rules.d/99-ftdid* find %{_builddir}/robotino_daemons/etc/systemd -type f -exec sed -i 's|/opt/robotino|/usr|g' {} + sed -i '7 a\User=robotino\nGroup=robotino' %{_builddir}/robotino_daemons/etc/systemd/system/rpcd.service rm -rd %{_builddir}/robotino_daemons/etc/default rm -rd %{_builddir}/robotino_daemons/etc/dhcp rm %{_builddir}/robotino_daemons/etc/hostapd.conf.default rm -rd %{_builddir}/robotino_daemons/etc/network cd %{_builddir}/robotino_daemons/ rm home/robotino -rfd # Add your patch here #%patch 0 -p1 # Install section %install cp -r %{_builddir}/robotino_daemons/* %{buildroot} rm -rd %{_builddir}/robotino_daemons/ ls %{buildroot}/opt/robotino mkdir %{buildroot}/usr/share/robotino/ -p mv %{buildroot}/opt/robotino/bin/* %{buildroot}/usr/bin/ mv %{buildroot}/usr/local/bin/* %{buildroot}/usr/bin/ mv %{buildroot}/opt/robotino/scripts/* %{buildroot}/usr/share/robotino/ mv %{buildroot}/opt/robotino %{buildroot}/usr/share/robotino/ # Remove empty directories rm -r %{buildroot}/opt rm ${buildroot}/home/robotino -rfd rm ${buildroot}/home/robotino -rfd # Package section %files %{_datadir}/robotino %{_bindir}/* /etc/systemd/system/* /etc/udev/rules.d/* /etc/robotino/* # Changelog %changelog * Fri Oct 13 2023 Your Name - 2.0.17-1 - Initial release