On Tue, May 27, 2003 at 01:10:16PM -0400, Tom Brown wrote:
> Debian appears to have an odd idea about where binaries belong. Apt-get on
> our box puts binaries in /usr/lib, not /usr/local. So aolserver and
> As a consequence I am having difficulty installing nspostgres. I just
> finished one round of altering the Makefile ($NSHOME path) which helped
> overcome several "can't find file or directory" type errors. Here is the
> current roadblock.
It's not that hard, you just need to tweak the Makefile some more, and
maybe some other things. I never got around to fully documenting this
anywhere, but here's what I did a while back on Debian 3.0. First
here's some notes, then a patch for the nspostgres Makefile follows
after that:
Installing PostgreSQL, Differences for Debian:
The Debian PostgreSQL packages seem to work very nicely, but some of
their default settings are differnt from the upstream source defaults
used in the OpenACS install docs.
On Debian 3.0, you will definitely need all of these packages (I
believe the intarray stuff in postgresql-contrib is needed by the
OpenFTS search engine used by OpenACS.):
postgresql postgresql-client postgresql-contrib and you may want or
need these as well:
postgresql-doc postgresql-dev
The Debian packages come with a nice /etc/init.d/postgresql script, so
you don't have to do anything special, just use it.
Note that the Debian packages do an initdb for you, locating it in
$PGDATA which is /var/lib/postgres/data by default. If you wat to put
it somewhere else you can either change PGDATA and do:
$ sudo /etc/init.d/postgresql stop
$ sudo su - postgres "initdb"
$ sudo /etc/init.d/postgresql start
Or manually specify the location with, e.g.:
$ sudo su - postgres "initdb -D /tmp/pg-test"
The Debian package already installs plpgsql for you, so you do not
need to do:
$ sudo su - postgres "createlang plpgsql template1"
To verify, do:
$ sudo su - postgres "createlang -l template1"
By default, errors go to: /var/log/postgres.log
Here's the patch for my nspostgres/Makefile:
$ cvs stat Makefile
===================================================================
File: Makefile Status: Needs Merge
Working revision: 1.4
Repository revision: 1.9 /cvsroot/aolserver/nspostgres/Makefile,v
$ cvs diff -u Makefile
Index: Makefile
===================================================================
RCS file: /cvsroot/aolserver/nspostgres/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile 29 Sep 2001 04:25:13 -0000 1.4
+++ Makefile 27 May 2003 17:49:28 -0000
@@ -6,8 +6,16 @@
# PostgreSQL Database Driver for AOLserver/OpenNSD
#
-ifdef INST
-NSHOME ?= $(INST)
+# I set these system-wide in /etc/profile-postgres.sh:
+# [EMAIL PROTECTED], 2002/12/10 00:12 EST
+#PGLIB = /usr/lib/postgresql/lib
+#PG_HEADERS = /usr/include/postgresql
+
+FOR_ACS_USE=1
+
+
+ifdef inst
+NSHOME ?= $(inst)
else
NSHOME ?= ../aolserver
endif
@@ -15,8 +23,14 @@
MOD = nspostgres.so
OBJS = nspostgres.o
HDRS =
-MODLIBS = -L$(POSTGRES)/lib -lpq
-CFLAGS += -DBIND_EMULATION -I$(POSTGRES)/include
+MODLIBS = -L$(PGLIB) -lpq
+CFLAGS += -DBIND_EMULATION -I$(PG_HEADERS)
+
+ifdef FOR_ACS_USE
+ CFLAGS += -DFOR_ACS_USE=1
+endif
+
+
include $(NSHOME)/include/Makefile.module
@@ -24,12 +38,12 @@
.PHONY: check-env
check-env:
- @if [ "$(POSTGRES)" = "" ]; then \
+ @if [ "$(PGLIB)" = "" -o "$(PG_HEADERS)" = "" ]; then \
echo "** "; \
- echo "** POSTGRES variable not set."; \
+ echo "** PGLIB variable not set."; \
echo "** nspostgres.so will not be built."; \
- echo "** Usage: make POSTGRES=/path/to/postgresql"; \
- echo "** Usage: make install POSTGRES=/path/to/postgresql
INST=/path/to/aolserver"; \
+ echo "** Usage: make PGLIB=/path/to/libraries
PG_HEADERS=/path/to/headers"; \
+ echo "** Usage: make inst=/path/to/aolserver" install; \
echo "** "; \
exit 1; \
fi
--
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/