--- Makefile.orig	Sun Mar 31 08:56:45 2002
+++ Makefile	Tue Sep 24 15:54:47 2002
@@ -4,9 +4,9 @@
 version   = 0.6.0
 OBJS      = src/expatls.o src/events.o src/node.o src/dom.o
 LIBNAME   = domc
-SONAME    = lib$(LIBNAME).so.0.6.0
-SOVERSION = lib$(LIBNAME).so.0.6
-CFLAGS    = -Wall -DMSGNO $(RPM_OPT_FLAGS)
+SONAME    = lib$(LIBNAME).so.${SHLIB_MAJOR}
+SOVERSION = lib$(LIBNAME).so.${SHLIB_MAJOR}
+CFLAGS    += -Wall -DMSGNO $(RPM_OPT_FLAGS)
 
 $(SONAME): $(OBJS)
 	gcc $(CFLAGS) -shared $(OBJS) -lc -lmba -lexpat -Wl,-soname -Wl,$(SOVERSION) -o $(SONAME)
@@ -18,11 +18,10 @@
 
 install: $(SONAME)
 	install -d $(libdir)
-	install -m 755 $(SONAME) $(libdir)
-	cd $(libdir) && ln -sf $(SONAME) $(SOVERSION) && ln -sf $(SONAME) lib$(LIBNAME).so
+	${BSD_INSTALL_DATA} $(SONAME) $(INSTDIR)/lib
+	cd $(INSTDIR)/lib ; ln -sf $(SONAME) $(INSTDIR)/lib/lib$(LIBNAME).so
 	install -d $(includedir)
-	install -m 444 src/domc.h $(includedir)
-	-/sbin/ldconfig $(libdir)
+	${BSD_INSTALL_DATA} src/domc.h $(INSTDIR)/include
 
 example:
 	$(MAKE) -C examples
