]> git.pld-linux.org Git - packages/ipheth.git/blame - ipheth.spec
- if building kernel module, re-alias to use our module update
[packages/ipheth.git] / ipheth.spec
CommitLineData
b30439c1
ER
1#
2# Conditional build:
3%bcond_without dist_kernel # allow non-distribution kernel
8249fc65 4%bcond_with kernel # don't build kernel modules
b30439c1
ER
5%bcond_without userspace # don't build userspace programs
6%bcond_with verbose # verbose build (V=1)
7
8249fc65
ER
8%if %{without kernel}
9%undefine with_dist_kernel
10%endif
11%if "%{_alt_kernel}" != "%{nil}"
12%undefine with_userspace
13%endif
14%if %{without userspace}
15# nothing to be placed to debuginfo package
16%define _enable_debug_packages 0
17%endif
18
40c58df2 19%define rel 2
8249fc65 20%define pname ipheth
b30439c1 21Summary: iPhone USB Ethernet Driver
956d0e5c 22Name: %{pname}%{_alt_kernel}
2e51e059 23Version: 1.0
8249fc65
ER
24Release: %{rel}
25License: BSD/GPL v2
b30439c1 26Group: X11/Applications
956d0e5c 27Source0: https://github.com/downloads/dgiagio/ipheth/ipheth-%{version}.tar.gz
2e51e059 28# Source0-md5: 80548f0d419ff0c2784d148b40b2aeb6
b30439c1
ER
29URL: http://giagio.com/wiki/moin.cgi/iPhoneEthernetDriver
30BuildRequires: libimobiledevice-devel
31Requires: udev-core
40c58df2 32Requires: usbmuxd
b30439c1
ER
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36This is a Linux Kernel driver that adds support for iPhone tethering
37through USB cables. Unlike other solutions out there, you don't need
38to jailbreak your phone or install third-party proxy applications.
39
8249fc65
ER
40%package -n kernel%{_alt_kernel}-net-ipheth
41Summary: Linux driver for iPhone USB Ethernet Driver
42Release: %{rel}@%{_kernel_ver_str}
43Group: Base/Kernel
44Requires(post,postun): /sbin/depmod
45%if %{with dist_kernel}
46%requires_releq_kernel
47Requires(postun): %releq_kernel
48%endif
49
50%description -n kernel%{_alt_kernel}-net-ipheth
51Linux driver for iPhone USB Ethernet Driver.
52
b30439c1 53%prep
2e51e059 54%setup -q
b30439c1
ER
55
56%build
8249fc65
ER
57%if %{with kernel}
58%build_kernel_modules -C ipheth-driver -m ipheth CONFIG_DEBUG_SECTION_MISMATCH=y
59%endif
b30439c1
ER
60%if %{with userspace}
61%{__make} -C ipheth-pair \
62 CC="%{__cc}" \
63 CFLAGS="%{rpmcflags}"
64%endif
65
66%install
67rm -rf $RPM_BUILD_ROOT
8249fc65 68%if %{with kernel}
0120bdab
ER
69%install_kernel_modules -m ipheth-driver/ipheth -d misc -s update -n %{pname}
70cat <<'EOF' >> /etc/modprobe.d/%{_kernel_ver}/%{pname}.conf
71blacklist %{pname}
72EOF
8249fc65
ER
73%endif
74
b30439c1
ER
75%if %{with userspace}
76install -d $RPM_BUILD_ROOT{/lib/udev,/etc/udev/rules.d}
77install -p ipheth-pair/ipheth-pair $RPM_BUILD_ROOT/lib/udev
956d0e5c 78cp -p ipheth-pair/90-iphone-tether.rules $RPM_BUILD_ROOT/etc/udev/rules.d
b30439c1
ER
79%endif
80
81%clean
82rm -rf $RPM_BUILD_ROOT
83
8249fc65
ER
84%post -n kernel%{_alt_kernel}-net-ipheth
85%depmod %{_kernel_ver}
86
87%postun -n kernel%{_alt_kernel}-net-ipheth
88%depmod %{_kernel_ver}
89
b30439c1
ER
90%files
91%defattr(644,root,root,755)
92%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/90-iphone-tether.rules
93%attr(755,root,root) /lib/udev/ipheth-pair
8249fc65
ER
94
95%if %{with kernel}
96%files -n kernel%{_alt_kernel}-net-ipheth
97%defattr(644,root,root,755)
0120bdab 98/etc/modprobe.d/%{_kernel_ver}/%{pname}.conf
8249fc65
ER
99/lib/modules/%{_kernel_ver}/misc/*.ko*
100%endif
This page took 0.107663 seconds and 4 git commands to generate.