123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- 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/app.conf ${RPM_BUILD_ROOT}/etc/%SERVICE_NAME%/app.conf
- 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%/app.conf
- /usr/lib/systemd/system/%SERVICE_NAME%.service
- %post
- #systemctl start %SERVICE_NAME%
- #systemctl enable %SERVICE_NAME%
|