app.spec.in 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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}/etc/%SERVICE_NAME%/static
  27. mkdir -p ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/swagger
  28. cp -a static/* ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/static
  29. cp -a swagger/* ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/swagger
  30. mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
  31. install ./conf/%SERVICE_NAME%.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
  32. %files
  33. /opt/%SERVICE_NAME%/bin/%APP_NAME%
  34. /etc/init.d/%SERVICE_NAME%
  35. /etc/%SERVICE_NAME%/lib/start-stop-functions
  36. /etc/%SERVICE_NAME%/lib/init-multi-mode
  37. /etc/%SERVICE_NAME%/static
  38. /etc/%SERVICE_NAME%/swagger
  39. /etc/%SERVICE_NAME%/app.conf
  40. /etc/%SERVICE_NAME%/gitlog
  41. /usr/lib/systemd/system/%SERVICE_NAME%.service