Answer the question
In order to leave comments, you need to log in
How to properly build RPM from source?
Hello!
Can you please tell me how to properly build an RPM package from source?
What you need: Build your own rpm package from the Zabbix agent sources.
I created an rpmbuild folder structure and wrote a SPEC file like this:
%define name zabbix_agentd
%define version 4.4.4
%define packager Zabbix
%define source zabbix-4.4.4.tar.gz
Name: %{name}
Version: %{version}
Release: 1
Summary: Zabbix Agent 4.4.4
Group: Applications/Internet
License: GPL
Source0: %{source}
Packager: %{packager}
%description
Zabbix agent 4.4.4
%prep
%setup -n zabbix-%{version}
%build
./configure --enable-agent
%install
make install
cp ./misc/init.d/fedora/core5/zabbix_agentd /etc/init.d/
chkconfig zabbix_agentd on
%clean
rm -rf %{buildroot}
%pre
groupadd --system zabbix
useradd --system -g zabbix -d /usr/lib/zabbix -s /sbin/nologin -c "Zabbix Monitoring System" zabbix
Answer the question
In order to leave comments, you need to log in
If the packages from the official Zabbix turnip are not satisfied with something, then at least you can take a spec from there to see how it is made there. In general, specs are rarely written from scratch - unless it's something rare, usually you can find it somewhere.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question