]> git.pld-linux.org Git - packages/fakeif.git/blame - fakeif.spec
- new
[packages/fakeif.git] / fakeif.spec
CommitLineData
826b0c9d
ER
1Summary: Set the value reported for a network card MAC address
2Name: fakeif
3Version: 0.1
4Release: 0.1
5License: ?
6Group: Applications
7Source0: http://www.chiark.greenend.org.uk/~peterb/linux/fakeif/%{name}-%{version}.tar.bz2
8# Source0-md5: 1ff69e4d383a9473ce94c50b16701001
9URL: http://www.chiark.greenend.org.uk/~peterb/linux/fakeif/
10BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
11
12%description
13Set the value reported for a network card MAC address.
14
15This program demonstrates the use of LD_PRELOAD to override the value
16returned by the library call. The library call in question is ioctl.
17When called with cmd set to SIOCGIFHWADDR, we override the value
18returned by the system call with the value from an environment
19variable.
20
21To use the program, first set the environment variable
22HWADDR_interface to the MAC address you would like to be returned. For
23example, to set eth0 to 11:22:33:44:55:66, do
24
25HWADDR_eth0=11:22:33:44:55:66 export HWADDR_eth0 Then set LD_PRELOAD
26to the absolute path of fakeif.so and call your test program.
27
28%prep
29%setup -q
30
31%build
32%{__cc} %{rpmcflags} %{rpmcppflags} -s -shared -o libfakeif.so %{rpmldflags} fakeif.c
33
34%install
35rm -rf $RPM_BUILD_ROOT
36install -d $RPM_BUILD_ROOT%{_libdir}
37install -p libfakeif.so $RPM_BUILD_ROOT%{_libdir}
38
39%clean
40rm -rf $RPM_BUILD_ROOT
41
42%files
43%defattr(644,root,root,755)
44%attr(755,root,root) %{_libdir}/libfakeif.so
This page took 0.070413 seconds and 4 git commands to generate.