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