re: 26c6a7ba6123163a7339b2ac046f7df72c594e13: removed RELEASE file,
[eostre.git] / drupal-automake-generic / Makefile
CommitLineData
8b2413e8 1DATE:=`date --iso-8601`
2
3# no-op by default
4default:
5 true
6
7# make sure perms are right, gets called at the end of many routines
8chown-www:
9 chown -R www-data:www-data /var/www
10
11# recipes for installing this thing onto a "real" (non-chroot) system
12# this is enough to get us to a functional Drupal install page
13# to go further, use the install-from-backups recipe
d8c73e01 14setup-real-system: probe-files install-pkgs install-drupal do-mysql chown-www post-install
8b2413e8 15
16# test that we have /install-{drupal-toolchain,packages}.sh /pkgs /sqldefaults and /do-mysql-sh
17# if we don't have all of these files, BAD THINGS may happen
18probe-files:
19 [ -f /install-packages.sh ]
20 [ -f /pkgs ]
21 [ -f /install-drupal-toolchain.sh ]
22 [ -f /do-mysql.sh ]
23 [ -f /sqldefaults ]
24
25install-drupal:
26 chmod +x /install-drupal-toolchain.sh
27 /install-drupal-toolchain.sh
28
29install-pkgs:
30 chmod +x /install-packages.sh
31 /install-packages.sh
32
33do-mysql:
34 chmod +x /do-mysql.sh
35 /do-mysql.sh
36 # secure these two files because they contain passwords in plaintext
37 chmod og-rwx /do-mysql.sh
38 chmod 0600 /sqldefaults
39
d8c73e01 40post-install: drupal-fix-404s-conf
41
42drupal-fix-404s-conf:
43 install conf/drupal-fix-404s.conf /etc/apache2/conf-available/
44 a2enconf drupal-fix-404s.conf
45
8b2413e8 46# recipes to restore the site from a backup
47install-from-backups: probe-backup-files install-sqldump install-drupal-sites chown-www
48
49probe-backup-files:
50 [ -f /sqldump ]
51 [ -d /sites ]
52
53install-sqldump:
54 # source the dump twice - once to create the DB, once to populate it
55 mysql -u root -p -e 'source /sqldump; use dbd_drupal; source /sqldump;'
56
57install-drupal-sites:
58 cd /var/www/html
59 cp -r /sites sites
60
61# recipes for building a chroot. notice that sql does not cooperate with chroots, due to some funky postinstall hooks and /proc namespaces conflicting
62build-chroot: new-chroot install-pkgs-in-chroot install-drupal-toolchain
63
64new-chroot:
65 rm -rf tristrap
66 mkdir tristrap
67 debootstrap --merged-usr etiona ./tristrap/ http://mirror.fsf.org/trisquel/
68
69install-pkgs-in-chroot:
70 cp files/pkgs tristrap
71 cp files/install-packages.sh tristrap
72 chmod +x tristrap/install-packages.sh
73 chroot tristrap /install-packages.sh
74
75install-drupal-toolchain:
76 cp files/install-drupal-toolchain.sh tristrap
77 chmod +x tristrap/install-drupal-toolchain.sh
78 chroot tristrap /install-drupal-toolchain.sh