added entry for the log_module table
[iserv-mod-room-reservation.git] / Makefile
1 # @file Makefile
2 # Makefile for installing, creating documentation etc.
3 # @author: Roland Hieber (roland.hieber@wilhelm-gym.net)
4 # @date: 12.11.2007
5 #
6 # Copyright © 2007 Roland Hieber
7 #
8 # Permission is hereby granted, free of charge, to any person obtaining
9 # copy of this software and associated documentation files (the "Software"),
10 # to deal in the Software without restriction, including without limitation
11 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 # and/or sell copies of the Software, and to permit persons to whom the
13 # Software is furnished to do so, subject to the following conditions:
14 #
15 # The above copyright notice and this permission notice shall be included in
16 # all copies or substantial portions of the Software.
17 #
18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 # THE SOFTWARE.
25 #
26
27 SOURCEFILES=src/*.php includes/*.inc
28 MODULE_DOC_FILES=doc/source/html/* doc/source/latex/*
29 LN=ln -f
30 RM=rm -rf
31 MKDIR=mkdir -p
32
33 # hardlink the files to their destinations
34 # TODO move documentation where Jörg wants it ;)
35 links:
36 $(MKDIR) /usr/share/doc/iserv/mod/room-reservation/source/
37 $(LN) doc/{LICENSE*,TODO,changelog*} /usr/share/doc/iserv/mod/room-reservation/
38 $(LN) doc/source/html/* /usr/share/doc/iserv/mod/room-reservation/source/
39
40 $(LN) img/16/*.png /usr/share/iserv/www/img/default/16/
41 $(LN) img/24/*.png /usr/share/iserv/www/img/default/24/
42 $(LN) img/32/*.png /usr/share/iserv/www/img/default/32/
43
44 $(MKDIR) /usr/share/iserv/www/inc/mod_room-reservation
45 $(LN) includes/*.inc /usr/share/iserv/www/inc/mod_room-reservation/
46 touch /usr/share/iserv/www/inc/mod_room-reservation/config.inc
47 chmod 664 /usr/share/iserv/www/inc/mod_room-reservation/config.inc
48 chown www-data /usr/share/iserv/www/inc/mod_room-reservation/config.inc
49
50 $(LN) lang/*.po /usr/share/iserv/locale/de/
51
52 $(LN) nav/*.mod /usr/share/iserv/www/nav/
53 $(LN) nav/admin/*.mod /usr/share/iserv/www/nav/admin
54
55 $(LN) priv/* /usr/share/iserv/priv/
56
57 $(LN) sql/*.sql /usr/share/iserv/db/
58 $(LN) sql/log_module/* /usr/share/iserv/db/log_module
59
60 $(MKDIR) /usr/share/iserv/www/mod_room-reservation/admin
61 $(LN) src/index.php /usr/share/iserv/www/mod_room-reservation/
62 $(LN) src/admin/config.php /usr/share/iserv/www/mod_room-reservation/admin/
63
64 $(MKDIR) /usr/share/iserv/modules/room-reservation
65 $(LN) update-iserv1-iserv2.pl /usr/share/iserv/modules/room-reservation
66 chmod 755 /usr/share/iserv/modules/room-reservation/update-iserv1-iserv2.pl
67
68 # build doxygen documentation from source
69 sourcedoc:
70 doxygen
71
72 # install everything
73 install: sourcedoc links
74 chkdb -r
75 chkpriv
76 chklocale
77
78 # uninstalling
79 uninstall:
80 $(RM) /usr/share/doc/iserv/mod/mod_room-reservation
81 $(RM) /usr/share/iserv/locale/de/mod_room-reservation.po
82 $(RM) /usr/share/iserv/db/mod_room-reservation.sql
83 $(RM) /usr/share/iserv/db/log_module/mod_room-reservation
84 $(RM) /usr/share/iserv/www/nav/79mod_room-reservation.mod
85 $(RM) /usr/share/iserv/priv/mod_room-reservation
86 $(RM) /usr/share/iserv/www/nav/admin/99mod_room-reservation.mod
87 $(RM) /usr/share/iserv/www/img/default/{16,24,32}/mod_room-reservation_{timeslice,index,config}.png
88 $(RM) /usr/share/iserv/www/inc/mod_room-reservation
89 $(RM) /usr/share/iserv/www/mod_room-reservation
90 $(RM) /usr/share/iserv/modules/room-reservation
91
92 psql -c "DELETE FROM log_module WHERE module='Room Reservation Schedule';"
93 chklocale
94
95 @echo ----------------------------------------------------------------------
96 @echo If you do not need the SQL tables anymore, remove them by running
97 @echo ' psql -c "DROP TABLE mod_roomreservation_bookings;"'
98 @echo After that, all bookings are unrecoverably deleted!
99 @echo ----------------------------------------------------------------------
This page took 0.050279 seconds and 5 git commands to generate.