app.spec.in 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
  26. install ./conf/%SERVICE_NAME%.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
  27. %files
  28. /opt/%SERVICE_NAME%/bin/%APP_NAME%
  29. /etc/init.d/%SERVICE_NAME%
  30. /etc/%SERVICE_NAME%/lib/start-stop-functions
  31. /etc/%SERVICE_NAME%/lib/init-multi-mode
  32. /etc/%SERVICE_NAME%/app.conf
  33. /usr/lib/systemd/system/%SERVICE_NAME%.service
  34. %post
  35. #systemctl start %SERVICE_NAME%
  36. #systemctl enable %SERVICE_NAME%