Summary: %APP_NAME% microservice Name: %APP_NAME% Version: stable Release: l License: user EULA Source: %APP_NAME%-%VERSION%.tgz Group: getensh/gateway BuildRoot: /tmp %define __debug_install_post \ %{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\ %{nil} %description %prep %setup -c %install echo %VERSION% mkdir -p ${RPM_BUILD_ROOT}/opt/%APP_NAME%/bin install ./%APP_NAME% ${RPM_BUILD_ROOT}/opt/%APP_NAME%/bin mkdir -p ${RPM_BUILD_ROOT}/etc/init.d/ install ./sh/app ${RPM_BUILD_ROOT}/etc/init.d/%APP_NAME% mkdir -p ${RPM_BUILD_ROOT}/etc/%APP_NAME%/lib/ install ./sh/init-multi-mode ${RPM_BUILD_ROOT}/etc/%APP_NAME%/lib/ install ./sh/start-stop-functions ${RPM_BUILD_ROOT}/etc/%APP_NAME%/lib/ mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ install ./conf/%APP_NAME%.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ %files /opt/%APP_NAME%/bin/%APP_NAME% /etc/init.d/%APP_NAME% /etc/%APP_NAME%/lib/start-stop-functions /etc/%APP_NAME%/lib/init-multi-mode /usr/lib/systemd/system/%APP_NAME%.service %post #systemctl start %APP_NAME% #systemctl enable %APP_NAME%