SHA256
1
0
forked from pool/dynamips
dynamips/dynamips.spec

57 lines
1.1 KiB
RPMSpec
Raw Normal View History

#norootforbuild
%define pkg_extraver RC2
Name: dynamips
Version: 0.2.8
Release: 1
License: GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libelf-devel libpcap-devel
Source: %{name}-%{version}-%{pkg_extraver}.tar.bz2
Group: Emulators
Summary: Cisco router Emulator
Patch0: dynamips-0.2.8-RC2-make.patch
%description
Cisco Router Emulator
%debug_package
%prep
%setup -q -n %{name}-%{version}-%{pkg_extraver}
%patch0
%ifarch x86_64
%{__sed} -i -e 's@=x86@=amd64@g' Makefile
%endif
%build
CFLAGS="%{optflags} -I/usr/include/libelf -fno-strict-aliasing"
CXXFLAGS="%{optflags} -I/usr/include/libelf -fno-strict-aliasing"
%if 0%{?suse_version} > 1000
CFLAGS="$CFLAGS -fstack-protector"
CXXFLAGS="$CXXFLAGS -fstack-protector"
%endif
export CFLAGS
export CXXFLAGS
%{__make}
%install
%{__make} install DESTDIR=%{buildroot} mandir=%{_mandir} bindir=%{_bindir}
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%{_bindir}/dynamips
%{_bindir}/nvram_export
%{_mandir}/man?/*.?.gz