1 ## |
1 ## |
2 ## tun.spec -- OpenPKG RPM Specification |
2 ## tun.spec -- OpenPKG RPM Specification |
3 ## Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com> |
3 ## Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com> |
4 ## |
4 ## |
5 ## Permission to use, copy, modify, and distribute this software for |
5 ## Permission to use, copy, modify, and distribute this software for |
6 ## any purpose with or without fee is hereby granted, provided that |
6 ## any purpose with or without fee is hereby granted, provided that |
7 ## the above copyright notice and this permission notice appear in all |
7 ## the above copyright notice and this permission notice appear in all |
8 ## copies. |
8 ## copies. |
34 Distribution: Europalab Networks Production |
34 Distribution: Europalab Networks Production |
35 Class: EVAL |
35 Class: EVAL |
36 Group: Driver |
36 Group: Driver |
37 License: GPL |
37 License: GPL |
38 Version: 1.1 |
38 Version: 1.1 |
39 Release: 20090106 |
39 Release: 20120800 |
40 |
40 |
41 # list of sources |
41 # list of sources |
42 Source0: http://vtun.sourceforge.net/tun/tun-%{version}.tar.gz |
42 Source0: http://vtun.sourceforge.net/tun/tun-%{version}.tar.gz |
43 Patch0: tun.patch |
43 Patch0: tun.patch |
44 |
44 |
45 # build information |
45 # build information |
46 Prefix: %{l_prefix} |
46 BuildPreReq: OpenPKG, openpkg >= 20100101, make |
47 BuildRoot: %{l_buildroot} |
47 PreReq: OpenPKG, openpkg >= 20100101 |
48 BuildPreReq: OpenPKG, openpkg >= 20050726, make |
|
49 PreReq: OpenPKG, openpkg >= 20050726 |
|
50 AutoReq: no |
|
51 AutoReqProv: no |
|
52 |
48 |
53 %description |
49 %description |
54 Tun provides packet reception and transmission for user space |
50 Tun provides packet reception and transmission for user space |
55 programs. It can be viewed as a simple Point-to-Point device, which |
51 programs. It can be viewed as a simple Point-to-Point device, which |
56 instead of receiving packets from a physical media, receives them |
52 instead of receiving packets from a physical media, receives them |
77 ( cd $locplat |
81 ( cd $locplat |
78 %{l_make} %{l_mflags -O} |
82 %{l_make} %{l_mflags -O} |
79 ) || exit $? |
83 ) || exit $? |
80 |
84 |
81 %install |
85 %install |
82 rm -rf $RPM_BUILD_ROOT |
|
83 %{l_shtool} mkdir -f -p -m 755 \ |
86 %{l_shtool} mkdir -f -p -m 755 \ |
84 $RPM_BUILD_ROOT%{l_prefix}/lib/tun |
87 $RPM_BUILD_ROOT%{l_prefix}/lib/tun |
85 locplat=`grep 'OS_DIR *=' Makefile | sed -e 's;OS_DIR[^=][^=]*= *\([^ ][^ ]*\);\1;'` |
88 locplat=`grep 'OS_DIR *=' Makefile | sed -e 's;OS_DIR[^=][^=]*= *\([^ ][^ ]*\);\1;'` |
86 ( cd $locplat |
89 ( cd $locplat |
87 %{l_shtool} install -c -m 644 \ |
90 %{l_shtool} install -c -m 644 \ |
90 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
93 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
91 |
94 |
92 %files -f files |
95 %files -f files |
93 |
96 |
94 %clean |
97 %clean |
95 rm -rf $RPM_BUILD_ROOT |
|
96 |
98 |
97 %post |
99 %post |
98 if [ $1 -eq 1 -o $1 -eq 2 ]; then |
100 if [ $1 -eq 1 -o $1 -eq 2 ]; then |
99 # announce special nature of this package |
101 # announce special nature of this package |
100 ( echo "Attention: The special nature of the package contents require privileged" |
102 ( echo "Attention: The special nature of the package contents require privileged" |