Installing/Building on CentOS 5/6/7

Started by terefang, October 04, 2016, 02:51:59 PM

Previous topic - Next topic

terefang

giving back to the community ...

install


yum -y groupinstall 'Development Tools'
yum -y install openldap-devel expat-devel zlib-devel mysql-devel sqlite-devel


here is a rpm spec file verfied to build under CentOS 5+6+7:

Name:           netxms
Version:        2.0.6
Release:        1.el5
Summary:        NETXMS

Group:          NETXMS
License:        GPLv2+
URL:            NETXMS
Source0:        netxms-2.0.6.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: tar
BuildRequires: gzip
BuildRequires: curl
BuildRequires: jdk
BuildRequires: openldap-devel
BuildRequires: expat-devel
BuildRequires: zlib-devel
BuildRequires: mysql-devel
BuildRequires: sqlite-devel
#BuildRequires: postgresql-devel

Requires: openldap-libs
Requires: expat
Requires: sqlite
Requires: mysql-libs

%description
NETXMS

%prep
%setup -q
./configure \
--prefix=/opt/netxms \
--enable-unicode \
--with-server \
--with-client \
--with-client-proxy \
--with-sdk \
--with-agent \
--with-snmp \
--with-sqlite \
--with-mysql


%build
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
mkdir %{buildroot}/opt/netxms/sbin/
cp contrib/startup/redhat/netxmsd %{buildroot}/opt/netxms/sbin/


%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc
/opt/netxms/

%changelog

Alex Kirhenshtein

Thank you.

Can you please specify license (GPL, MIT, Public domain) - I'll include it into official packages repository.

terefang

MIT



Copyright (c) 2016, Alfred Reibenschuh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.