]>
Commit | Line | Data |
---|---|---|
b30439c1 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without dist_kernel # allow non-distribution kernel | |
0c9b31d5 JB |
4 | %bcond_with kernel # kernel modules [already in Linux >= 2.6.34] |
5 | %bcond_without userspace # userspace programs | |
b30439c1 ER |
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 | ||
0c9b31d5 | 19 | %define rel 8 |
8249fc65 | 20 | %define pname ipheth |
b30439c1 | 21 | Summary: iPhone USB Ethernet Driver |
0c9b31d5 | 22 | Summary(pl.UTF-8): Sterownik ethernetowy dla iPhone'a po USB |
956d0e5c | 23 | Name: %{pname}%{_alt_kernel} |
2e51e059 | 24 | Version: 1.0 |
8249fc65 ER |
25 | Release: %{rel} |
26 | License: BSD/GPL v2 | |
b30439c1 | 27 | Group: X11/Applications |
0c9b31d5 | 28 | #Source0Download: https://github.com/dgiagio/ipheth/releases/ |
956d0e5c | 29 | Source0: https://github.com/downloads/dgiagio/ipheth/ipheth-%{version}.tar.gz |
2e51e059 | 30 | # Source0-md5: 80548f0d419ff0c2784d148b40b2aeb6 |
0c9b31d5 JB |
31 | URL: https://github.com/dgiagio/ipheth |
32 | BuildRequires: libimobiledevice-devel >= 1 | |
33 | BuildRequires: pkgconfig | |
b30439c1 | 34 | Requires: udev-core |
40c58df2 | 35 | Requires: usbmuxd |
b30439c1 ER |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
38 | %description | |
39 | This is a Linux Kernel driver that adds support for iPhone tethering | |
40 | through USB cables. Unlike other solutions out there, you don't need | |
41 | to jailbreak your phone or install third-party proxy applications. | |
42 | ||
0c9b31d5 JB |
43 | This package contains the device pairing program. |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | ipheth to sterownik jądra Linuksa dodające obsługę transmisji | |
47 | ethernetowej z iPhonem przez kabel USB. W przeciwieństwie do innych | |
48 | rozwiązań, nie wymaga to łamania zabezpieczeń telefonu ani | |
49 | instalowania zewnętrznych proxy. | |
50 | ||
51 | Ten pakiet zawiera program do parowania urządzeń. | |
52 | ||
8249fc65 ER |
53 | %package -n kernel%{_alt_kernel}-net-ipheth |
54 | Summary: Linux driver for iPhone USB Ethernet Driver | |
0c9b31d5 | 55 | Summary(pl.UTF-8): Sterownik jądra Linuksa do ethernetu dla iPhone'a po USB |
8249fc65 ER |
56 | Release: %{rel}@%{_kernel_ver_str} |
57 | Group: Base/Kernel | |
58 | Requires(post,postun): /sbin/depmod | |
59 | %if %{with dist_kernel} | |
60 | %requires_releq_kernel | |
61 | Requires(postun): %releq_kernel | |
62 | %endif | |
63 | ||
64 | %description -n kernel%{_alt_kernel}-net-ipheth | |
65 | Linux driver for iPhone USB Ethernet Driver. | |
66 | ||
0c9b31d5 JB |
67 | %description -n kernel%{_alt_kernel}-net-ipheth -l pl.UTF-8 |
68 | Sterownik jądra Linuksa do ethernetu dla iPhone'a po USB. | |
69 | ||
b30439c1 | 70 | %prep |
2e51e059 | 71 | %setup -q |
b30439c1 ER |
72 | |
73 | %build | |
8249fc65 ER |
74 | %if %{with kernel} |
75 | %build_kernel_modules -C ipheth-driver -m ipheth CONFIG_DEBUG_SECTION_MISMATCH=y | |
76 | %endif | |
0c9b31d5 | 77 | |
b30439c1 ER |
78 | %if %{with userspace} |
79 | %{__make} -C ipheth-pair \ | |
80 | CC="%{__cc}" \ | |
0c9b31d5 JB |
81 | CFLAGS="%{rpmcflags} -Wall" \ |
82 | LDLIBS="%{rpmldflags} $(pkg-config --libs libimobiledevice-1.0)" | |
b30439c1 ER |
83 | %endif |
84 | ||
85 | %install | |
86 | rm -rf $RPM_BUILD_ROOT | |
0c9b31d5 | 87 | |
8249fc65 | 88 | %if %{with kernel} |
0120bdab | 89 | %install_kernel_modules -m ipheth-driver/ipheth -d misc -s update -n %{pname} |
a40c685e | 90 | cat <<'EOF' >> $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}/%{pname}.conf |
0120bdab ER |
91 | blacklist %{pname} |
92 | EOF | |
8249fc65 ER |
93 | %endif |
94 | ||
b30439c1 | 95 | %if %{with userspace} |
c2971acd | 96 | install -d $RPM_BUILD_ROOT/lib/udev/rules.d |
b30439c1 | 97 | install -p ipheth-pair/ipheth-pair $RPM_BUILD_ROOT/lib/udev |
a40c685e | 98 | cp -p ipheth-pair/90-iphone-tether.rules $RPM_BUILD_ROOT/lib/udev/rules.d |
b30439c1 ER |
99 | %endif |
100 | ||
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
8249fc65 ER |
104 | %post -n kernel%{_alt_kernel}-net-ipheth |
105 | %depmod %{_kernel_ver} | |
106 | ||
107 | %postun -n kernel%{_alt_kernel}-net-ipheth | |
108 | %depmod %{_kernel_ver} | |
109 | ||
b30439c1 ER |
110 | %files |
111 | %defattr(644,root,root,755) | |
a40c685e | 112 | /lib/udev/rules.d/90-iphone-tether.rules |
b30439c1 | 113 | %attr(755,root,root) /lib/udev/ipheth-pair |
8249fc65 ER |
114 | |
115 | %if %{with kernel} | |
116 | %files -n kernel%{_alt_kernel}-net-ipheth | |
117 | %defattr(644,root,root,755) | |
0c9b31d5 JB |
118 | /etc/modprobe.d/%{_kernel_ver}/ipheth.conf |
119 | /lib/modules/%{_kernel_ver}/misc/ipheth.ko* | |
8249fc65 | 120 | %endif |