Initial Leopard version. Untested.
[tuntaposx.git] / tuntap / Makefile
blob8fe6aa24633732add9a596783897bb0b36c14bc8
1 # Lets have a version, at last!
2 TUNTAP_VERSION = 20070920
4 # BASE install directory
5 BASE=
7 all: tap.kext tun.kext
8 cp -pR tap.kext pkg/tap_kext/Library/Extensions/
9 cp -pR tun.kext pkg/tun_kext/Library/Extensions/
10 cp -pR startup_item/tap pkg/startup_item/Library/StartupItems/
11 cp -pR startup_item/tun pkg/startup_item/Library/StartupItems/
13 pkg: all
14 sed -e 's/@@TUNTAP_VERSION@@/$(TUNTAP_VERSION)/' pkg/tap_kext.desc/Info.plist.in > pkg/tap_kext.desc/Info.plist
15 sed -e 's/@@TUNTAP_VERSION@@/$(TUNTAP_VERSION)/' pkg/tun_kext.desc/Info.plist.in > pkg/tun_kext.desc/Info.plist
16 sed -e 's/@@TUNTAP_VERSION@@/$(TUNTAP_VERSION)/' pkg/startup_item.desc/Info.plist.in > pkg/startup_item.desc/Info.plist
17 tools/makepkg.sh pkg/tap_kext.pkg pkg/tap_kext pkg/tap_kext.res pkg/tap_kext.desc
18 tools/makepkg.sh pkg/tun_kext.pkg pkg/tun_kext pkg/tun_kext.res pkg/tun_kext.desc
19 tools/makepkg.sh pkg/startup_item.pkg pkg/startup_item pkg/startup_item.res pkg/startup_item.desc
20 @# make a copy of the tuntap metapackage not containing the CVS data
21 -rm -rf pkg/tuntap_installer.mpkg
22 -mkdir pkg/tuntap_installer.mpkg
23 tar cv -C pkg/tuntap.mpkg . --exclude '*CVS*' | tar xv -C pkg/tuntap_installer.mpkg
24 tar czf tuntap_leopard_$(TUNTAP_VERSION).tar.gz README.installer README -C pkg tap_kext.pkg tun_kext.pkg startup_item.pkg tuntap_installer.mpkg
25 rm -rf pkg/tuntap_installer.mpkg
27 # Install targets
28 # They are provided for the gentoo ebuild, but should work just fine for other people as well.
29 install_kext: tap.kext tun.kext
30 mkdir -p ${BASE}/Library/Extensions
31 cp -pR tap.kext ${BASE}/Library/Extensions/
32 cp -pR tun.kext ${BASE}/Library/Extensions/
34 install_scripts:
35 mkdir -p ${BASE}/Library/StartupItems
36 cp -pR startup_item/tap ${BASE}/Library/StartupItems/
37 cp -pR startup_item/tun ${BASE}/Library/StartupItems/
39 install: install_kext install_scripts
41 tarball: clean
42 tar czf tuntap_leopard_$(TUNTAP_VERSION)_src.tar.gz --exclude "*/CVS*" --exclude "tuntap/tuntap_*src.tar.gz" \
43 --exclude "*/.*" -C .. tuntap
45 clean:
46 cd src/tap && make -f Makefile clean
47 cd src/tun && make -f Makefile clean
48 -rm -rf pkg/tap_kext.desc/Info.plist
49 -rm -rf pkg/tun_kext.desc/Info.plist
50 -rm -rf pkg/startup_item.desc/Info.plist
51 -rm -rf pkg/tap_kext/Library/Extensions/tap.kext
52 -rm -rf pkg/tun_kext/Library/Extensions/tun.kext
53 -rm -rf pkg/startup_item/Library/StartupItems/tap
54 -rm -rf pkg/startup_item/Library/StartupItems/tun
55 -rm -rf pkg/tap_kext.pkg
56 -rm -rf pkg/tun_kext.pkg
57 -rm -rf pkg/startup_item.pkg
58 -rm -rf tuntap_leopard_$(TUNTAP_VERSION).tar.gz
59 -rm -rf tuntap_leopard_$(TUNTAP_VERSION)_src.tar.gz
61 tap.kext:
62 cd src/tap && make TUNTAP_VERSION=$(TUNTAP_VERSION) -f Makefile all
64 tun.kext:
65 cd src/tun && make TUNTAP_VERSION=$(TUNTAP_VERSION) -f Makefile all