Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 159013 | Differences between
and this patch

Collapse All | Expand All

(-)zaptel-1.4.6.orig/build_tools/genmodconf (-14 lines)
Lines 79-98 Link Here
79
79
80
echo Building ${target}...
80
echo Building ${target}...
81
81
82
if [ "${1}" = "linux24" ]; then
83
    for mod in ${3}; do
84
	if ! grep -q "post-install ${mod} " ${target}; then
85
	    echo "post-install ${mod} /sbin/ztcfg" >> ${target}
86
	fi
87
    done
88
elif [ "${1}" = "linux26" ]; then
89
    for mod in ${3}; do
90
	if ! grep -q "install ${mod} " ${target}; then
91
	    echo "install ${mod} /sbin/modprobe --ignore-install ${mod} ${cmdopts} && /sbin/ztcfg" >> ${target}
92
	fi
93
    done
94
fi
95
96
if [ -z "${combined}" ]; then
82
if [ -z "${combined}" ]; then
97
    echo "***"
83
    echo "***"
98
    echo "*** WARNING:"
84
    echo "*** WARNING:"
(-)zaptel-1.4.6.orig/build_tools/genudevrules (-6 / +6 lines)
Lines 22-31 Link Here
22
22
23
cat <<EOF
23
cat <<EOF
24
# zaptel devices with ownership/permissions for running as non-root
24
# zaptel devices with ownership/permissions for running as non-root
25
KERNEL${match}"zapctl", NAME="zap/ctl", OWNER="asterisk", GROUP="asterisk", MODE="0660"
25
KERNEL${match}"zapctl", NAME="zap/ctl", OWNER="root", GROUP="dialout", MODE="0660"
26
KERNEL${match}"zaptranscode", NAME="zap/transcode", OWNER="asterisk", GROUP="asterisk", MODE="0660"
26
KERNEL${match}"zaptranscode", NAME="zap/transcode", OWNER="root", GROUP="dialout", MODE="0660"
27
KERNEL${match}"zaptimer", NAME="zap/timer", OWNER="asterisk", GROUP="asterisk", MODE="0660"
27
KERNEL${match}"zaptimer", NAME="zap/timer", OWNER="root", GROUP="dialout", MODE="0660"
28
KERNEL${match}"zapchannel", NAME="zap/channel", OWNER="asterisk", GROUP="asterisk", MODE="0660"
28
KERNEL${match}"zapchannel", NAME="zap/channel", OWNER="root", GROUP="dialout", MODE="0660"
29
KERNEL${match}"zappseudo", NAME="zap/pseudo", OWNER="asterisk", GROUP="asterisk", MODE="0660"
29
KERNEL${match}"zappseudo", NAME="zap/pseudo", OWNER="root", GROUP="dialout", MODE="0660"
30
KERNEL${match}"zap[0-9]*", NAME="zap/%n", OWNER="asterisk", GROUP="asterisk", MODE="0660"
30
KERNEL${match}"zap[0-9]*", NAME="zap/%n", OWNER="root", GROUP="dialout", MODE="0660"
31
EOF
31
EOF
(-)zaptel-1.4.6.orig/Makefile (-19 / +25 lines)
Lines 40-52 Link Here
40
  BUILDVER:=linux26
40
  BUILDVER:=linux26
41
endif
41
endif
42
42
43
# This is not related to the version that we build. Rather, to the
44
# version that we runs. If we build for 2.4 using 2.4 headers on a 2.6
45
# system with udev mounted on /dev , no point in installing files to /dev
46
# because they'll be wiped at next reboot. XXX: should this be a use-flag? Perhaps: noudev?
47
DYNFS:=$(shell ps ax | grep -v grep | grep -qw 'devfsd\|udevd' && echo "yes")
48
49
# Check for udev rules directories
50
ifneq (,$(wildcard $(ROOT_PREFIX)/etc/udev/rules.d))
51
  UDEVRULES=yes
52
endif
53
43
# Set HOTPLUG_FIRMWARE=no to override automatic building with hotplug support
54
# Set HOTPLUG_FIRMWARE=no to override automatic building with hotplug support
44
# if it is enabled in the kernel.
55
# if it is enabled in the kernel.
45
ifeq ($(BUILDVER),linux26)
56
ifeq ($(BUILDVER),linux26)
46
  ifneq (,$(wildcard $(DESTDIR)/etc/udev/rules.d))
47
    DYNFS=yes
48
    UDEVRULES=yes
49
  endif
50
  HOTPLUG_FIRMWARE:=$(shell if grep CONFIG_FW_LOADER $(KINCLUDES)/linux/autoconf.h | grep -q undef; then echo "no"; else echo "yes"; fi)
57
  HOTPLUG_FIRMWARE:=$(shell if grep CONFIG_FW_LOADER $(KINCLUDES)/linux/autoconf.h | grep -q undef; then echo "no"; else echo "yes"; fi)
51
else
58
else
52
  # Hotplug firmware loading is not supported on any other version then 2.6
59
  # Hotplug firmware loading is not supported on any other version then 2.6
Lines 139-145 Link Here
139
endif
146
endif
140
147
141
OPTFLAG=-O2
148
OPTFLAG=-O2
142
CFLAGS+=-I. $(OPTFLAGS) -g -fPIC -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
149
CFLAGS+=-I. $(OPTFLAGS) -Iinclude -fPIC -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
143
ifneq (,$(findstring ppc,$(UNAME_M)))
150
ifneq (,$(findstring ppc,$(UNAME_M)))
144
CFLAGS_PPC:=-fsigned-char
151
CFLAGS_PPC:=-fsigned-char
145
endif
152
endif
Lines 438-444 Link Here
438
$(UTILSO): %.o: %.c
445
$(UTILSO): %.o: %.c
439
	$(CC) $(CFLAGS) -o $@ -c $<
446
	$(CC) $(CFLAGS) -o $@ -c $<
440
447
441
install: all devices install-modules install-programs install-firmware
448
install: devices install-modules install-programs install-firmware
442
	@echo "###################################################"
449
	@echo "###################################################"
443
	@echo "###"
450
	@echo "###"
444
	@echo "### Zaptel installed successfully."
451
	@echo "### Zaptel installed successfully."
Lines 451-474 Link Here
451
install-programs: install-utils install-libs install-include
458
install-programs: install-utils install-libs install-include
452
459
453
install-utils: utils install-xpp
460
install-utils: utils install-xpp
454
	install -d $(DESTDIR)$(BIN_DIR)
461
	$(INSTALL) -d $(DESTDIR)$(BIN_DIR)
455
	install  $(BINS) $(DESTDIR)$(BIN_DIR)/
462
	$(INSTALL)  $(BINS) $(DESTDIR)$(BIN_DIR)/
456
	install -d $(DESTDIR)$(MAN_DIR)
463
	$(INSTALL) -d $(DESTDIR)$(MAN_DIR)
457
	install -m 644 $(MAN_PAGES) $(DESTDIR)$(MAN_DIR)/
464
	$(INSTALL) -m 644 $(MAN_PAGES) $(DESTDIR)$(MAN_DIR)/
458
ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
465
ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
459
	$(INSTALL) -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
466
	$(INSTALL) -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
460
endif
467
endif
461
468
462
# Pushing those two to a separate target that is not used by default:
469
# Pushing those two to a separate target that is not used by default:
463
install-modconf:
470
install-modconf:
464
	build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out zaptel ztdummy xpp zttranscode ztdynamic,$(BUILD_MODULES)) $(MODULE_ALIASES)"
471
	$(INSTALL) -d -m 755 $(DESTDIR)/etc/modules.d
465
	@if [ -d /etc/modutils ]; then \
472
	build_tools/genmodconf $(BUILDVER) "$(DESTDIR)" "$(filter-out zaptel ztdummy xpp zttranscode ztdynamic,$(BUILD_MODULES)) $(MODULE_ALIASES)"
466
		/sbin/update-modules ; \
467
	fi
468
473
469
install-firmware:
474
install-firmware:
470
ifeq ($(HOTPLUG_FIRMWARE),yes)
475
ifeq ($(HOTPLUG_FIRMWARE),yes)
471
	$(MAKE) -C firmware hotplug-install DESTDIR=$(DESTDIR)
476
	$(MAKE) -C firmware hotplug-install
472
endif
477
endif
473
478
474
install-libs: libs
479
install-libs: libs
Lines 476-482 Link Here
476
	$(INSTALL) -D -m 755 $(LTZ_SO) $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER)
481
	$(INSTALL) -D -m 755 $(LTZ_SO) $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER)
477
ifeq (,$(DESTDIR))
482
ifeq (,$(DESTDIR))
478
	if [ `id -u` = 0 ]; then \
483
	if [ `id -u` = 0 ]; then \
479
		/sbin/ldconfig || : ;\
484
		/sbin/ldconfig -n $(DESTDIR)/usr/lib || : ;\
480
	fi
485
	fi
481
endif
486
endif
482
	rm -f $(DESTDIR)$(LIB_DIR)$(LTZ_SO)
487
	rm -f $(DESTDIR)$(LIB_DIR)$(LTZ_SO)
Lines 522-529 Link Here
522
	done
527
	done
523
else # DYNFS
528
else # DYNFS
524
  ifdef UDEVRULES
529
  ifdef UDEVRULES
525
	install -d $(DESTDIR)/etc/udev/rules.d
530
	$(INSTALL) -d $(DESTDIR)/etc/udev/rules.d
526
	build_tools/genudevrules > $(DESTDIR)/etc/udev/rules.d/zaptel.rules
531
	build_tools/genudevrules > zaptel.rules
532
	$(INSTALL) -D -m 644 zaptel.rules $(DESTDIR)/etc/udev/rules.d/10-zaptel.rules
527
  else # !UDEVRULES
533
  else # !UDEVRULES
528
	@echo "**** Dynamic filesystem detected -- not creating device nodes"
534
	@echo "**** Dynamic filesystem detected -- not creating device nodes"
529
  endif
535
  endif
Lines 554-560 Link Here
554
	$(MAKE) -C datamods install
560
	$(MAKE) -C datamods install
555
  endif
561
  endif
556
endif
562
endif
557
	[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
563
	[ -z "$(DESTDIR)" -a `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
558
564
559
config:
565
config:
560
ifneq (,$(COPY_INITD))
566
ifneq (,$(COPY_INITD))
(-)zaptel-1.4.6.orig/xpp/utils/Makefile (-1 / +1 lines)
Lines 90-96 Link Here
90
	# for backward compatibility and for hotplug users:
90
	# for backward compatibility and for hotplug users:
91
	ln -sf $(DATADIR)/xpp_fxloader $(DESTDIR)$(HOTPLUG_USB_DIR)/
91
	ln -sf $(DATADIR)/xpp_fxloader $(DESTDIR)$(HOTPLUG_USB_DIR)/
92
	$(INSTALL) -d $(DESTDIR)$(UDEV_RULES_DIR)
92
	$(INSTALL) -d $(DESTDIR)$(UDEV_RULES_DIR)
93
	$(INSTALL_DATA) xpp.rules $(DESTDIR)$(UDEV_RULES_DIR)/
93
	$(INSTALL_DATA) -D xpp.rules $(DESTDIR)$(UDEV_RULES_DIR)/10-xpp.rules
94
ifneq	(,$(PERLLIBDIR))
94
ifneq	(,$(PERLLIBDIR))
95
	$(INSTALL) -d $(DESTDIR)$(PERLLIBDIR)
95
	$(INSTALL) -d $(DESTDIR)$(PERLLIBDIR)
96
	for i in $(PERL_DIRS); \
96
	for i in $(PERL_DIRS); \

Return to bug 159013