app.spec.in 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. install ./conf/microsoft.ttf ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/
  27. install ./conf/mplus-1p-bold.ttf ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/
  28. mkdir -p ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/swagger
  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%/swagger
  38. /etc/%SERVICE_NAME%/app.conf
  39. /etc/%SERVICE_NAME%/gitlog
  40. /etc/%SERVICE_NAME%/microsoft.ttf
  41. /etc/%SERVICE_NAME%/mplus-1p-bold.ttf
  42. /usr/lib/systemd/system/%SERVICE_NAME%.service