|
|
@ -1,5 +1,5 @@ |
|
|
|
%define name hastic-server |
|
|
|
%define name hastic-server |
|
|
|
%define version %{getenv:HASTIC_RELEASE_VERSION}_node%{getenv:RPM_NODE_VERSION} |
|
|
|
%define version %{getenv:HASTIC_RELEASE_VERSION} |
|
|
|
%define release 0 |
|
|
|
%define release 0 |
|
|
|
%define buildroot /root/rpmbuild/BUILDROOT |
|
|
|
%define buildroot /root/rpmbuild/BUILDROOT |
|
|
|
%define builddir /root/rpmbuild/BUILD |
|
|
|
%define builddir /root/rpmbuild/BUILD |
|
|
@ -61,12 +61,8 @@ popd |
|
|
|
|
|
|
|
|
|
|
|
%install |
|
|
|
%install |
|
|
|
mkdir -p %{buildroot}/usr/lib/hastic-server/server/dist |
|
|
|
mkdir -p %{buildroot}/usr/lib/hastic-server/server/dist |
|
|
|
mkdir -p %{buildroot}/usr/lib/hastic-server/.git/refs/heads |
|
|
|
|
|
|
|
mkdir -p %{buildroot}/usr/lib/hastic-server/analytics/dist/server |
|
|
|
mkdir -p %{buildroot}/usr/lib/hastic-server/analytics/dist/server |
|
|
|
cp -r server/dist %{buildroot}/usr/lib/hastic-server/server/ |
|
|
|
cp -r server/dist %{buildroot}/usr/lib/hastic-server/server/ |
|
|
|
cp -r server/package.json %{buildroot}/usr/lib/hastic-server/server/ |
|
|
|
|
|
|
|
cp -r .git/HEAD %{buildroot}/usr/lib/hastic-server/.git |
|
|
|
|
|
|
|
cp -r .git/refs/heads/ %{buildroot}/usr/lib/hastic-server/.git/refs/ |
|
|
|
|
|
|
|
cp -r analytics/dist/server %{buildroot}/usr/lib/hastic-server/analytics/dist/ |
|
|
|
cp -r analytics/dist/server %{buildroot}/usr/lib/hastic-server/analytics/dist/ |
|
|
|
|
|
|
|
|
|
|
|
%post |
|
|
|
%post |
|
|
@ -77,7 +73,7 @@ fi |
|
|
|
ln -s /etc/hastic-server/config.json /usr/lib/hastic-server/config.json |
|
|
|
ln -s /etc/hastic-server/config.json /usr/lib/hastic-server/config.json |
|
|
|
|
|
|
|
|
|
|
|
mkdir -p /var/hastic-server/ |
|
|
|
mkdir -p /var/hastic-server/ |
|
|
|
ln -s /usr/lib/hastic-server/data /var/hastic-server/data |
|
|
|
ln -s /var/hastic-server/data /usr/lib/hastic-server/data |
|
|
|
|
|
|
|
|
|
|
|
echo 'node /usr/lib/hastic-server/server/dist/server' > /usr/bin/hastic-server |
|
|
|
echo 'node /usr/lib/hastic-server/server/dist/server' > /usr/bin/hastic-server |
|
|
|
chmod +x /usr/bin/hastic-server |
|
|
|
chmod +x /usr/bin/hastic-server |
|
|
|