Summary: %APP_NAME% micro service Name: %APP_NAME% Version: stable Release: l License: user EULA Source: %APP_NAME%-%VERSION%.tgz Group: utimes/microservice 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/%SERVICE_NAME%/bin install ./%APP_NAME% ${RPM_BUILD_ROOT}/opt/%SERVICE_NAME%/bin mkdir -p ${RPM_BUILD_ROOT}/etc/init.d/ install ./sh/app ${RPM_BUILD_ROOT}/etc/init.d/%SERVICE_NAME% mkdir -p ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/lib/ install ./sh/init-multi-mode ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/lib/ install ./sh/start-stop-functions ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/lib/ install ./conf/common.yaml ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/common.yaml mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ install ./conf/%SERVICE_NAME%.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ %files /opt/%SERVICE_NAME%/bin/%APP_NAME% /etc/init.d/%SERVICE_NAME% /etc/%SERVICE_NAME%/lib/start-stop-functions /etc/%SERVICE_NAME%/lib/init-multi-mode /etc/%SERVICE_NAME%/common.yaml /usr/lib/systemd/system/%SERVICE_NAME%.service %post #systemctl start %SERVICE_NAME% #systemctl enable %SERVICE_NAME%