source: bearmail/Makefile @ 477

Last change on this file since 477 was 477, checked in by zerodeux, 11 years ago

Release 0.3.1: gave up bearmail- prefix on config files (which are already in /etc/bearmail/)

File size: 5.4 KB
Line 
1default:
2        @echo "Available targets:"
3        @echo "  make install DESTDIR=/usr/local"
4        @echo "  make clean"
5        @echo "  make deb"
6
7
8install: install-bearmail install-antispam install-antivirus install-web
9install-bearmail:
10        install -D -m 755 bin/bearmail-update                               $(DESTDIR)/usr/sbin/
11        install -D -m 755 bin/bearmail-switch                               $(DESTDIR)/usr/sbin/
12        install -D -m 755 bin/bearmail-sieve_*                              $(DESTDIR)/usr/sbin/
13        install -D -m 644 conf/postfix/*                                    $(DESTDIR)/etc/bearmail/postfix/
14        install -D -m 644 conf/dovecot/*                                    $(DESTDIR)/etc/bearmail/dovecot/
15        install -D -m 644 lib/BearMail/Backend.pm                           $(DESTDIR)/usr/share/perl5/BearMail/
16        install -D -m 644 lib/BearMail/Backend/Files.pm                     $(DESTDIR)/usr/share/perl5/BearMail/Backend/
17        install -D -m 644 doc/man/bearmail-update.8                         $(DESTDIR)/usr/share/man/man8/
18        install -D -m 644 doc/man/bearmail-switch.8                         $(DESTDIR)/usr/share/man/man8/
19        install -D -m 644 doc/man/bearmail-sieve_*                          $(DESTDIR)/usr/share/man/man8/
20install-antivirus:
21        install -D -m 755 bin/bearmail-virus*                               $(DESTDIR)/usr/lib/bearmail/
22        install -D -m 644 conf/clamsmtpd.conf                               $(DESTDIR)/etc/bearmail/clamsmtp/clamsmtpd.conf
23install-antispam:
24        install -D -m 755 bin/bearmail-dspam_retrain*                       $(DESTDIR)/usr/lib/bearmail/
25        install -D -m 755 bin/bearmail-dspam_cleaner                        $(DESTDIR)/usr/sbin/
26        install -D -m 644 conf/dspam/*.conf                                 $(DESTDIR)/etc/bearmail/dspam/
27        install -D -m 644 conf/dspam/*.prefs                                $(DESTDIR)/etc/bearmail/dspam/
28        install -D -m 644 conf/dspam_incoming                               $(DESTDIR)/etc/bearmail/postfix/
29        install -D -m 644 doc/man/bearmail-dspam_cleaner.8                  $(DESTDIR)/usr/share/man/man8/
30install-web:
31        install -D -m 644 doc/mail-clients/fr/img/*                         $(DESTDIR)/usr/share/bearmail/htdoc/fr/img/
32        install -D -m 644 doc/mail-clients/fr/*html                         $(DESTDIR)/usr/share/bearmail/htdoc/fr/
33        install -D -m 644 public/*                                          $(DESTDIR)/usr/share/bearmail/public/
34        install -D -m 644 template/*                                        $(DESTDIR)/usr/share/bearmail/templates/
35        install -D -m 644 lib/BearMail/Web.pm                               $(DESTDIR)/usr/share/perl5/BearMail/
36        install -D -m 644 lib/BearMail/Web/Address/*                        $(DESTDIR)/usr/share/perl5/BearMail/Web/Address/
37        install -D -m 644 lib/BearMail/Web/Domain/*                         $(DESTDIR)/usr/share/perl5/BearMail/Web/Domain/
38        install -D -m 644 lib/BearMail/Web/*.pm                             $(DESTDIR)/usr/share/perl5/BearMail/Web/
39        install -D -m 755 bin/bearmail.cgi                                  $(DESTDIR)/usr/share/bearmail/
40        install -D -m 644 conf/bearmail.conf                                $(DESTDIR)/etc/bearmail/
41
42clean:
43        rm -f *-stamp
44        rm -f debian/bearmail.debhelper.log
45        rm -f debian/files
46        rm -fr debian/bearmail
47        rm -fr debian/bearmail-antivirus
48        rm -fr debian/bearmail-antispam
49        rm -fr debian/bearmail-web
50
51deb:
52        dpkg-buildpackage -rfakeroot -uc -us -A
53
54
55CPAN_MODULES= \
56    http://search.cpan.org/CPAN/authors/id/M/MA/MARKSTOS/CGI-Application-4.31.tar.gz \
57    http://search.cpan.org/CPAN/authors/id/M/MA/MARKSTOS/CGI-Application-Dispatch-2.17.tar.gz \
58    http://search.cpan.org/CPAN/authors/id/T/TH/THILO/CGI-Application-Plugin-AutoRunmode-0.16.tar.gz \
59    http://search.cpan.org/CPAN/authors/id/M/MA/MARKSTOS/CGI-Application-Plugin-ConfigAuto-1.31.tar.gz \
60    http://search.cpan.org/CPAN/authors/id/W/WO/WONKO/CGI-Application-Plugin-ViewCode-1.02.tar.gz \
61    http://search.cpan.org/CPAN/authors/id/C/CE/CEESHEK/CGI-Application-Plugin-Redirect-1.00.tar.gz \
62    http://search.cpan.org/CPAN/authors/id/C/CE/CEESHEK/CGI-Application-Plugin-Session-1.03.tar.gz \
63    http://search.cpan.org/CPAN/authors/id/N/NE/NEKOKAK/CGI-Application-Plugin-DebugScreen-0.06.tar.gz \
64    http://search.cpan.org/CPAN/authors/id/M/MS/MSCHWERN/UNIVERSAL-require-0.13.tar.gz \
65    http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Exception-Class-1.29.tar.gz \
66    http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/Exception-Class-TryCatch-1.12.tar.gz \
67    http://search.cpan.org/CPAN/authors/id/T/TM/TMTM/Class-Data-Inheritable-0.08.tar.gz \
68    http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Devel-StackTrace-1.22.tar.gz \
69    http://search.cpan.org/CPAN/authors/id/M/MA/MARKSTOS/CGI-Session-4.42.tar.gz \
70    http://search.cpan.org/CPAN/authors/id/S/SA/SAMTREGAR/HTML-Template-2.9.tar.gz
71
72cpan_fetch:
73        mkdir -p .cache
74        cd .cache; \
75            for url in $(CPAN_MODULES); do test -e `basename $$url` || wget -nv -c $$url; done
76
77cpan_unpack: cpan_fetch
78        cd .cache; \
79            for mod in *.tar.gz; do test -d $${mod/.tar.gz/} || tar xzf $$mod; done
80
81cpan_fixes: cpan_unpack
82        cd .cache; \
83        cd CGI-Application-Plugin-AutoRunmode-0.16 && \
84            mkdir -p lib/CGI/Application/Plugin && \
85            mv AutoRunmode* lib/CGI/Application/Plugin 2>/dev/null; true
86        cd .cache; \
87        cd HTML-Template-2.9 && \
88            mkdir -p lib/HTML && \
89            mv Template* lib/HTML 2>/dev/null; true
90
91cpan_update: cpan_fixes
92        cd .cache; \
93        for mod in */lib; do cp -rf $$mod/* ../lib; done
94
95cpan_clean:
96        rm -fr .cache
Note: See TracBrowser for help on using the repository browser.