summaryrefslogtreecommitdiff
blob: 6b60d8e43d9d9fc1db022078cc437801bbdc19b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
diff -Nura zaptel-1.2.16/build_tools/genmodconf zaptel-1.2.16.gentoo/build_tools/genmodconf
--- zaptel-1.2.16/build_tools/genmodconf	2007-01-31 11:06:34.000000000 -0300
+++ zaptel-1.2.16.gentoo/build_tools/genmodconf	2007-04-19 12:21:11.955803761 -0300
@@ -79,20 +79,6 @@
 
 echo Building ${target}...
 
-if [ "${1}" = "linux24" ]; then
-    for mod in ${3}; do
-	if ! grep -q "post-install ${mod} " ${target}; then
-	    echo "post-install ${mod} /sbin/ztcfg" >> ${target}
-	fi
-    done
-elif [ "${1}" = "linux26" ]; then
-    for mod in ${3}; do
-	if ! grep -q "install ${mod} " ${target}; then
-	    echo "install ${mod} /sbin/modprobe --ignore-install ${mod} ${cmdopts} && /sbin/ztcfg" >> ${target}
-	fi
-    done
-fi
-
 if [ -z "${combined}" ]; then
     echo "***"
     echo "*** WARNING:"
diff -Nura zaptel-1.2.16/build_tools/genudevrules zaptel-1.2.16.gentoo/build_tools/genudevrules
--- zaptel-1.2.16/build_tools/genudevrules	2007-01-31 14:27:30.000000000 -0300
+++ zaptel-1.2.16.gentoo/build_tools/genudevrules	2007-04-19 12:28:20.390284221 -0300
@@ -22,10 +22,10 @@
 
 cat <<EOF
 # zaptel devices with ownership/permissions for running as non-root
-KERNEL${match}"zapctl", NAME="zap/ctl", OWNER="asterisk", GROUP="asterisk", MODE="0660"
-KERNEL${match}"zaptimer", NAME="zap/timer", OWNER="asterisk", GROUP="asterisk", MODE="0660"
-KERNEL${match}"zapchannel", NAME="zap/channel", OWNER="asterisk", GROUP="asterisk", MODE="0660"
-KERNEL${match}"zappseudo", NAME="zap/pseudo", OWNER="asterisk", GROUP="asterisk", MODE="0660"
-KERNEL${match}"zaptranscode", NAME="zap/transcode", OWNER="asterisk", GROUP="asterisk", MODE="0660"
-KERNEL${match}"zap[0-9]*", NAME="zap/%n", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+KERNEL${match}"zapctl", NAME="zap/ctl", OWNER="root", GROUP="dialout", MODE="0660"
+KERNEL${match}"zaptimer", NAME="zap/timer", OWNER="root", GROUP="dialout", MODE="0660"
+KERNEL${match}"zapchannel", NAME="zap/channel", OWNER="root", GROUP="dialout", MODE="0660"
+KERNEL${match}"zappseudo", NAME="zap/pseudo", OWNER="root", GROUP="dialout", MODE="0660"
+KERNEL${match}"zaptranscode", NAME="zap/transcode", OWNER="root", GROUP="dialout", MODE="0660"
+KERNEL${match}"zap[0-9]*", NAME="zap/%n", OWNER="root", GROUP="dialout", MODE="0660"
 EOF
diff -Nura zaptel-1.2.16/Makefile zaptel-1.2.16.gentoo/Makefile
--- zaptel-1.2.16/Makefile	2007-03-07 16:14:30.000000000 -0300
+++ zaptel-1.2.16.gentoo/Makefile	2007-04-19 12:39:39.943874878 -0300
@@ -93,7 +93,7 @@
 
 INSTALL_PREFIX:=$(DESTDIR)
 
-CFLAGS+=-I. -O4 -g -Wall
+CFLAGS+=-I. -Iinclude -g -Wall
 CFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
 CFLAGS_X86-64:=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi)
 CFLAGS+=$(CFLAGS_PPC) $(CFLAGS_X86-64)
@@ -331,7 +331,8 @@
 else # DYNFS
   ifdef UDEVRULES
 	install -d $(INSTALL_PREFIX)/etc/udev/rules.d
-	build_tools/genudevrules > $(INSTALL_PREFIX)/etc/udev/rules.d/zaptel.rules
+	build_tools/genudevrules > zaptel.rules
+	install -D -m 644 zaptel.rules $(INSTALL_PREFIX)/etc/udev/rules.d/10-zaptel.rules
   else # !UDEVRULES
 	@echo "**** Dynamic filesystem detected -- not creating device nodes"
   endif
@@ -346,7 +347,7 @@
 	tar -zxf mISDNuser.tar.gz
 	$(MAKE) -C mISDNuser install
 
-install: all devices firmware
+install: devices firmware
 	install -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg
 	if [ -f sethdlc-new ]; then \
 		install -D -m 755 sethdlc-new $(INSTALL_PREFIX)/sbin/sethdlc; \
@@ -370,24 +371,21 @@
 	fi; \
 	rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/wcfxs.o
 	install -D -m 755 $(LIBTONEZONE_SO) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
-	[ `id -u` = 0 ] && /sbin/ldconfig || :
+	[ `id -u` = 0 ] && /sbin/ldconfig -n $(INSTALL_PREFIX)/usr/lib || :
 	rm -f $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
 	ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
 		$(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER)
 	ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
 		$(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
-	if [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") ; then /sbin/restorecon -v $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO); fi
 	install -D -m 644 zaptel.h $(INSTALL_PREFIX)/usr/include/linux/zaptel.h
 	install -D -m 644 torisa.h $(INSTALL_PREFIX)/usr/include/linux/torisa.h
 	install -D -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include/tonezone.h
-	install -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
-	install -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
-	[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
+	install -d $(INSTALL_PREFIX)/usr/share/man/man8
+	install -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8/
+	install -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8/
 	[ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE)
+	install -d -m 755 $(INSTALL_PREFIX)/etc/modules.d
 	build_tools/genmodconf $(BUILDVER) "$(INSTALL_PREFIX)" "$(filter-out zaptel ztdummy zttranscode wctc4xxp ztdynamic xpp_usb,$(MODULES)) $(MODULE_ALIASES)"
-	@if [ -d /etc/modutils ]; then \
-		/sbin/update-modules ; \
-	fi
 
 install-udev: devices