summaryrefslogtreecommitdiff
blob: 799fe7367bb11bbd9b3125672ea9015cf5401e64 (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
diff -udNr tuxguardian-0.5/daemon/Makefile tuxguardian-0.5-gentoo/daemon/Makefile
--- tuxguardian-0.5/daemon/Makefile	2006-04-09 01:28:18.000000000 +0200
+++ tuxguardian-0.5-gentoo/daemon/Makefile	2007-04-26 20:33:32.000000000 +0200
@@ -1,4 +1,4 @@
-bindir=/usr/local/bin
+bindir=/usr/sbin
 
 
 all:	daemon
@@ -7,8 +7,10 @@
 	gcc -pthread daemon.c pblhash.c pbl.c md5.c -o tg-daemon
 
 install:
-	@install -m 0700 -o root -g root tg-daemon $(bindir) && \
-	touch /etc/daemon.conf && \
+	/bin/mkdir -p ${DESTDIR}$(bindir)
+	@install -m 0700 -o root -g root tg-daemon ${DESTDIR}$(bindir) && \
+	/bin/mkdir ${DESTDIR}/etc
+	touch ${DESTDIR}/etc/daemon.conf && \
 	echo Done.;
 
 uninstall:
diff -udNr tuxguardian-0.5/frontend/tg-frontend.pro tuxguardian-0.5-gentoo/frontend/tg-frontend.pro
--- tuxguardian-0.5/frontend/tg-frontend.pro	2006-04-09 00:14:12.000000000 +0200
+++ tuxguardian-0.5-gentoo/frontend/tg-frontend.pro	2007-04-26 20:40:41.000000000 +0200
@@ -13,5 +13,5 @@
 TEMPLATE	=app
 CONFIG	+= qt warn_on release
 LANGUAGE	= C++
-DESTDIR = /usr/local/bin
+DESTDIR =./
 QMAKE_CXXFLAGS_WARN_ON = -Wno-non-virtual-dtor
diff -udNr tuxguardian-0.5/Makefile tuxguardian-0.5-gentoo/Makefile
--- tuxguardian-0.5/Makefile	2006-04-09 01:37:31.000000000 +0200
+++ tuxguardian-0.5-gentoo/Makefile	2007-04-26 20:47:16.000000000 +0200
@@ -5,31 +5,15 @@
 ifeq ($(IS_ROOT), yes)
 all:
 	@echo -e "\n\nCompiling and installing the frontend\n------------------------------------------------"; \
-	cd frontend; qmake tg-frontend.pro; make; cd ..;
+	cd frontend; /usr/qt/3/bin/qmake tg-frontend.pro; make;cd ..;
 
 	@echo -e "\n\nCompiling the daemon\n------------------------------------------------"; \
 	cd daemon; make; 
-	@echo -e "\n\nInstalling the daemon\n------------------------------------------------"; \
-	cd daemon; make install; 
-
-	@echo -e "\n\nCompiling the module\n------------------------------------------------"; \
-	cd module; make; 
-	@echo -e "\n\nInstalling the module\n------------------------------------------------"; \
-	cd module; make install;
-
-	@echo -e "\n\n\n\nSuccess! To start TuxGuardian:"
-	@echo -e "---------------------------------"
-	@echo -e "            (for more information, please visit tuxguardian.sf.net)\n"
-	@echo -e "\t$$ su"
-	@echo -e "\t   <enter root password>"
-	@echo -e "\t$$ tg-daemon &"
-	@echo -e "\t$$ modprobe tuxg"
-	@echo -e "\t$$ tg-frontend &\n"
-
+#	@echo -e "\n\nCompiling the module\n------------------------------------------------"; \
+#	cd module; make; 
 clean:
-	@for i in $(PARTS); do \
 	echo -e "\n\nCleaning the "$$i"\n------------------------------------------------"; \
-	cd $$i; make clean; cd ..; \
+	cd daemon; make clean; cd ..; \
 	done
 uninstall: 
 	@echo -e "\n\nUninstalling the frontend\n------------------------------------------------"; \
@@ -39,9 +23,12 @@
 	cd daemon; make uninstall; cd ..;
 
 	@echo -e "\n\nUninstalling the module\n------------------------------------------------"; \
-	cd module; make uninstall;
+#	cd module; make uninstall;
 install:
-	@echo -e "No need to 'make install'. Just type 'make'"
+#	cd module; make install DESTDIR="${DESTDIR}"; cd ..;
+	cd daemon; make install DESTDIR="${DESTDIR}"; cd ..;
+	cd frontend; cp tg-frontend ${DESTDIR}usr/sbin/; cd ..;
+
 else
 all:
 	@echo "You must be root to compile and install!"
@@ -49,8 +36,6 @@
 clean:
 	@echo "You must be root to clear!"
 	@exit 1
-install:
-	@echo -e "No need to 'make install'. Just type 'make'"
 uninstall:
 	@echo "You must be root to uninstall!"
 	@exit 1
diff -udNr tuxguardian-0.5/module/Makefile tuxguardian-0.5-gentoo/module/Makefile
--- tuxguardian-0.5/module/Makefile	2006-04-09 00:12:59.000000000 +0200
+++ tuxguardian-0.5-gentoo/module/Makefile	2007-04-26 20:33:32.000000000 +0200
@@ -1,40 +1,31 @@
-KERNELDIR := /lib/modules/$(shell uname -r)/build
-KERNEL_SOURCES := $(KERNDIR)
+MODULES_DIR := /lib/modules/$(shell uname -r)
+KERNEL_DIR  := ${MODULES_DIR}/build
+KERNEL_SOURCES := $(KERNEL_DIR)
+
 KERNEL_HEADERS := -I$(KERNEL_SOURCES)/include
 
-obj-m := tuxg.o
+
+obj-m += tuxg.o
 tuxg-objs := tg-defs.o tg.o
 EXTRA_CFLAGS += -Os 
+.PHONY: all modules modules_install install clean
 
 MODULE_NAME := tuxg
 
 
-# checks if the user is running kernel 2.6.12 or above
-MINOR=$(shell uname -r | cut -c3)
-VERSION=$(shell uname -r | sed -n 's/[[:digit:]]\.[[:digit:]]\.\([[:digit:]]*\).*/\1/p')
-CORRECT_VERSION=$(shell if [ $(VERSION) -ge 12 -a $(MINOR) -ge 6 ]; then echo yes; else echo no; fi)
-ifeq ($(CORRECT_VERSION),yes)
-all:
-	make -C /lib/modules/$(shell uname -r)/build/ SUBDIRS=$(shell pwd) modules
-else
-all:
-	@echo "You need kernel 2.6.12 or above!"
-	@exit 1
-endif
-
-
 
+all: module
+	
 
-install:
-	@install -m 0700 -o root -g root tuxg.ko /lib/modules/$(shell uname -r)
-	@/sbin/depmod -ae
-	@echo "Done."
+module:
+	make ${KERNEL_HEADERS} -C ${KERNEL_DIR} M=$$PWD modules;
 
-uninstall:
-	@rm -f /lib/modules/$(shell uname -r)/tuxg.ko
-	@depmod -ae
-	@echo "Done."
+install: module_install
+	
+modules_install:
+	make -C ${KERNEL_DIR} M=$$PWD modules_install;
 
 clean:
 	@rm -rf *.o *.ko *.mod.? .t* *~
 	@echo "Done."
+