app.spec.in 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Summary: %APP_NAME% micro service
  2. Name: %APP_NAME%
  3. Version: stable
  4. Release: l
  5. License: user EULA
  6. Source: %APP_NAME%-%VERSION%.tgz
  7. Group: utimes/microservice
  8. BuildRoot: /tmp
  9. %define __debug_install_post \
  10. %{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
  11. %{nil}
  12. %description
  13. %prep
  14. %setup -c
  15. %install
  16. echo %VERSION%
  17. mkdir -p ${RPM_BUILD_ROOT}/opt/%SERVICE_NAME%/bin
  18. install ./%APP_NAME% ${RPM_BUILD_ROOT}/opt/%SERVICE_NAME%/bin
  19. mkdir -p ${RPM_BUILD_ROOT}/etc/init.d/
  20. install ./sh/app ${RPM_BUILD_ROOT}/etc/init.d/%SERVICE_NAME%
  21. mkdir -p ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/lib/
  22. install ./sh/init-multi-mode ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/lib/
  23. install ./sh/start-stop-functions ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/lib/
  24. install ./conf/app.conf ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/app.conf
  25. install ./gitlog ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/
  26. mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
  27. install ./conf/%SERVICE_NAME%.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
  28. %files
  29. /opt/%SERVICE_NAME%/bin/%APP_NAME%
  30. /etc/init.d/%SERVICE_NAME%
  31. /etc/%SERVICE_NAME%/lib/start-stop-functions
  32. /etc/%SERVICE_NAME%/lib/init-multi-mode
  33. /etc/%SERVICE_NAME%/app.conf
  34. /etc/%SERVICE_NAME%/gitlog
  35. /usr/lib/systemd/system/%SERVICE_NAME%.service
  36. %post
  37. #systemctl start %SERVICE_NAME%
  38. #systemctl enable %SERVICE_NAME%