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
|
# Makefile for pronto
# Written by ai
VERSION = 2.4.0
PREFIX = /usr/local
LIBDIR = $(PREFIX)/lib/pronto
BINDIR = $(PREFIX)/bin
MODULEPREFIX = /usr
# MODULEPREFIX = $(LIBDIR)/modules
REDHAT = /usr/src/redhat
# on Mandrake systems
# REDHAT = /usr/src/RPM
CPANBUILD = ~/.cpan/build
CVSROOT=':pserver:anonymous@cvs.muhri.net:/home/cvsroot'
export CVSROOT
all:
test:
perl -e 'eval { require "csclib.pl"; 1; } && print "Test passed.\n";'
install:
install -d $(LIBDIR)
install -d $(LIBDIR)/pixmaps
install -d $(LIBDIR)/pixmaps/neon
install -d $(LIBDIR)/pixmaps/pro
install -d $(LIBDIR)/migration-scripts
install -d $(LIBDIR)/Prontocrypt
install -d $(LIBDIR)/docs
install -d $(LIBDIR)/docs/images
install -m644 pixmaps/pro/*.xpm $(LIBDIR)/pixmaps/pro
install -m644 pixmaps/neon/*.xpm $(LIBDIR)/pixmaps/neon
install -m644 docs/*.* $(LIBDIR)/docs
install -m644 docs/images/*.* $(LIBDIR)/docs/images
install migration-scripts/*.pl $(LIBDIR)/migration-scripts
install migration-scripts/*.sh $(LIBDIR)/migration-scripts
install pronto $(BINDIR)
install pronto-main $(BINDIR)
install prontoget $(BINDIR)
install prontosend $(BINDIR)
install prontobrowser $(BINDIR)
install cpronto.pl $(BINDIR)
install prontolock -m2755 -o root -g mail $(BINDIR)
install -m644 prontolib.pl $(LIBDIR)
install -m644 Prontocrypt/*.pm $(LIBDIR)/Prontocrypt
install -m644 HtmlStripper.pm $(LIBDIR)
install -m644 pronto.gtkrc $(LIBDIR)
# FIXME: the versions shouldn't be hardwired like this
# unfortunately, the CPAN module doesn't seem install anywhere other than
# the standard location, even though there is a documented way to do it -
# so we have to run make install PREFIX=... by hand - therefore we have to know
# the exact directory names.
# FIXME: it would be useful if this checked if a module is present before grabbing it, huh
build-modules:
perl -MCPAN -e ' \
force("make", "TIMB/DBI-1.13.tar.gz"); \
force("make", "JWIED/Text-CSV_XS-0.20.tar.gz"); \
force("make", "JWIED/SQL-Statement-0.1016.tar.gz"); \
force("make", "JWIED/DBD-CSV-0.1022.tar.gz"); \
force("make", "SBECK/DateManip-5.37.tar.gz"); \
force("make", "GAAS/MIME-Base64-2.11.tar.gz"); \
force("make", "GAAS/HTML-Parser-3.07.tar.gz"); \
force("make", "ERYQ/MIME-tools-4.124.tar.gz"); \
force("make", "O/OK/OKAMAOTO/MIME-Types-0.02.tar.gz"); \
force("make", "GAAS/URI-1.0.5.tar.gz"); \
force("make", "GBARR/IO-1.20.tar.gz"); \
force("make", "KJALB/Gtk-Perl-0.7000.tar.gz"); \
';
cd $(CPANBUILD)/Gtk-Perl-0.7000/GtkXmHTML ; \
perl Makefile.PL ; \
make ;
install-modules:
cd $(CPANBUILD)/DBI-1.13 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/Text-CSV_XS-0.20 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/SQL-Statement-0.1016 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/DBD-CSV-0.1022 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/DateManip-5.37 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/MIME-Base64-2.11 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/MIME-tools-4.124 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/MIME-Types-.0.02 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/HTML-Parser-3.07 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/URI-1.0.5 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/IO-1.20 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/Gtk-Perl-0.7000 ; make install PREFIX=$(MODULEPREFIX)
cd $(CPANBUILD)/Gtk-Perl-0.7000/GtkXmHTML ; make install PREFIX=$(MODULEPREFIX)
uninstall:
rm -r $(LIBDIR)
rm $(BINDIR)/pronto
rm $(BINDIR)/prontoget
rm $(BINDIR)/prontosend
rm $(BINDIR)/pronto-main
rm $(BINDIR)/prontobrowser
rm $(BINDIR)/cpronto.pl
cvs-update: clean
cvs login
cvs -z3 update
clean:
rm -rf *~ core \#* .\#*
dist: clean
rm -rf /tmp/pronto-$(VERSION)
cp -r . /tmp/pronto-$(VERSION)
tar czf ../pronto-$(VERSION).tar.gz -C /tmp/ pronto-$(VERSION)
rm -rf /tmp/pronto-$(VERSION)
rpm-nomodules: dist
cp pronto-nomodules.spec $(REDHAT)/SPECS/
cp ../pronto-$(VERSION).tar.gz $(REDHAT)/SOURCES/
rpm -ba $(REDHAT)/SPECS/pronto-nomodules.spec
# FIXME the first few steps take forever and will be repeated every time ;)
rpm: dist
make -i uninstall PREFIX=/usr
make build-modules
make install-modules MODULEPREFIX=/usr
make install-modules MODULEPREFIX=/usr/lib/pronto/modules
cp pronto.spec $(REDHAT)/SPECS/
cp ../pronto-$(VERSION).tar.gz $(REDHAT)/SOURCES/
rpm -ba $(REDHAT)/SPECS/pronto.spec
# experimental
deb:
alien $(REDHAT)/RPMS/i386/pronto-$(VERSION)*.rpm
mv *.deb ../
deb-nomodules:
alien $(REDHAT)/RPMS/i386/pronto-nomodules-$(VERSION)*.rpm
mv *.deb ../
|