w***@yahoo.ca
2007-12-20 15:32:13 UTC
$ rpmbuild -bb ./test.spec
error: File /home/powah/rpmbuild/SOURCES/test-2.3.0.tar.gz: No such
file or directory
test.spec is as follows:
%define sourced_version %(cat ../../../distribution/VERSION)
Release: %(cat ../../../distribution/RELEASE)
# Override target directory for binary rpms
%define _rpmdir ../../../distribution/packages/linux
%define _prefix /usr/local
Summary: SNMP Agent
Name: test
Vendor: pwwong, Inc.
#Version: %{libmaj}.%{libmin}.%{librel}
Version: %{sourced_version}
License: Commercial
Group: Applications/Cryptography
Source: %{name}-%{version}.tar.gz
Packager: Pwwong Support ***@pwwong-inc.com
BuildRoot: /var/tmp/%{name}-%{version}-root
AutoReqProv: no
%description
SNMP Agent
%prep
%setup
%build
%install
%define RPM_BUILD_DIR /usr/src/redhat/BUILD/%{name}-%{version}
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/bin/
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/sbin/
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/share/test/
mkdir -p $RPM_BUILD_ROOT//var/net-test/
mkdir -p $RPM_BUILD_ROOT//etc/init.d/
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testtrap
$RPM_BUILD_ROOT/%{_prefix}/bin/testtrap
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testd
$RPM_BUILD_ROOT/%{_prefix}/sbin/testd
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettest.so.15
$RPM_BUILD_ROOT/%{_prefix}/lib/libnettest.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettestagent.so.
15 $RPM_BUILD_ROOT/%{_prefix}/lib/libnettestagent.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettesthelpers.so.
15 $RPM_BUILD_ROOT/%{_prefix}/lib/libnettesthelpers.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettestmibs.so.15
$RPM_BUILD_ROOT/%{_prefix}/lib/libnettestmibs.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/ctestd.conf
$RPM_BUILD_ROOT/%{_prefix}/share/test/testd.conf
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/ltestd.conf
$RPM_BUILD_ROOT/var/net-test/testd.conf
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testd.init
$RPM_BUILD_ROOT/etc/init.d/testd
%post
if ! grep "/usr/local/lib" -q /etc/ld.so.conf ; then
echo "/usr/local/lib" >> /etc/ld.so.conf
/sbin/ldconfig
fi
chkconfig --add testd
chkconfig --level 0123456 testd off
%preun
chkconfig --del testd
%files
%defattr(-, root, root)
%dir /usr/local
%dir /usr/local/lib
%dir /usr/local/bin
%dir /usr/local/sbin
%attr(0544,root,root) /usr/local/bin/testtrap
%attr(0544,root,root) /usr/local/sbin/testd
%attr(0444,root,root) /usr/local/lib/libnettest.so.15
%attr(0444,root,root) /usr/local/lib/libnettestagent.so.15
%attr(0444,root,root) /usr/local/lib/libnettesthelpers.so.15
%attr(0444,root,root) /usr/local/lib/libnettestmibs.so.15
%attr(0544,root,root) /etc/init.d/testd
%config(noreplace) %attr(0444,root,root) /usr/local/share/test/
testd.conf
%config(noreplace) %attr(0444,root,root) /var/net-test/testd.conf
error: File /home/powah/rpmbuild/SOURCES/test-2.3.0.tar.gz: No such
file or directory
test.spec is as follows:
%define sourced_version %(cat ../../../distribution/VERSION)
Release: %(cat ../../../distribution/RELEASE)
# Override target directory for binary rpms
%define _rpmdir ../../../distribution/packages/linux
%define _prefix /usr/local
Summary: SNMP Agent
Name: test
Vendor: pwwong, Inc.
#Version: %{libmaj}.%{libmin}.%{librel}
Version: %{sourced_version}
License: Commercial
Group: Applications/Cryptography
Source: %{name}-%{version}.tar.gz
Packager: Pwwong Support ***@pwwong-inc.com
BuildRoot: /var/tmp/%{name}-%{version}-root
AutoReqProv: no
%description
SNMP Agent
%prep
%setup
%build
%install
%define RPM_BUILD_DIR /usr/src/redhat/BUILD/%{name}-%{version}
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/bin/
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/sbin/
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/share/test/
mkdir -p $RPM_BUILD_ROOT//var/net-test/
mkdir -p $RPM_BUILD_ROOT//etc/init.d/
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testtrap
$RPM_BUILD_ROOT/%{_prefix}/bin/testtrap
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testd
$RPM_BUILD_ROOT/%{_prefix}/sbin/testd
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettest.so.15
$RPM_BUILD_ROOT/%{_prefix}/lib/libnettest.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettestagent.so.
15 $RPM_BUILD_ROOT/%{_prefix}/lib/libnettestagent.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettesthelpers.so.
15 $RPM_BUILD_ROOT/%{_prefix}/lib/libnettesthelpers.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettestmibs.so.15
$RPM_BUILD_ROOT/%{_prefix}/lib/libnettestmibs.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/ctestd.conf
$RPM_BUILD_ROOT/%{_prefix}/share/test/testd.conf
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/ltestd.conf
$RPM_BUILD_ROOT/var/net-test/testd.conf
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testd.init
$RPM_BUILD_ROOT/etc/init.d/testd
%post
if ! grep "/usr/local/lib" -q /etc/ld.so.conf ; then
echo "/usr/local/lib" >> /etc/ld.so.conf
/sbin/ldconfig
fi
chkconfig --add testd
chkconfig --level 0123456 testd off
%preun
chkconfig --del testd
%files
%defattr(-, root, root)
%dir /usr/local
%dir /usr/local/lib
%dir /usr/local/bin
%dir /usr/local/sbin
%attr(0544,root,root) /usr/local/bin/testtrap
%attr(0544,root,root) /usr/local/sbin/testd
%attr(0444,root,root) /usr/local/lib/libnettest.so.15
%attr(0444,root,root) /usr/local/lib/libnettestagent.so.15
%attr(0444,root,root) /usr/local/lib/libnettesthelpers.so.15
%attr(0444,root,root) /usr/local/lib/libnettestmibs.so.15
%attr(0544,root,root) /etc/init.d/testd
%config(noreplace) %attr(0444,root,root) /usr/local/share/test/
testd.conf
%config(noreplace) %attr(0444,root,root) /var/net-test/testd.conf