Bug 81214 - [PATCH] databases/firebird-server: Polish Makefile and readd the work to not change files automatically
Summary: [PATCH] databases/firebird-server: Polish Makefile and readd the work to not ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sergey Matveychuk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-18 19:50 UTC by Renato Botelho
Modified: 2005-05-21 09:02 UTC (History)
0 users

See Also:


Attachments
firebird-server-1.5.2.patch (7.79 KB, patch)
2005-05-18 19:50 UTC, Renato Botelho
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Renato Botelho 2005-05-18 19:50:02 UTC
[DESCRIBE CHANGES]
- Use PORTDOCS and SUBFILES, respect NOPORTDOCS
- Use DOCSDIR and EXAMPLESDIR
- back to use do-build
- Add $FreeBSD$ tag to pkg-plist* and pkg-install
- Remove code that changes automatically /etc/services and /etc/inetd.conf and
  change pkg-message to reflect this
- Change my email to freebsd@galle.com.br

Generated with FreeBSD Port Tools 0.63
Comment 1 Renato Botelho 2005-05-19 16:38:43 UTC
Here is a new patch that fix the problem with php, it transfer the
instalation of firebird.conf to the firebird-client port, and patch
firebird to use this file on ${PREFIX}/etc.

Bump PORTREVISION is necessary.

--- firebird-server.diff starts here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/databases/firebird-server/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- Makefile	19 May 2005 10:39:39 -0000	1.39
+++ Makefile	19 May 2005 15:35:48 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME?=	firebird
 PORTVERSION=	1.5.2
+PORTREVISION=	1
 CATEGORIES?=	databases
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=firebird
@@ -54,6 +55,8 @@
 SHAREOWN=	firebird
 SHAREGRP=	firebird
 
+SUB_FILES=	pkg-install pkg-message aliases.conf
+
 PKGMESSAGE=	${WRKDIR}/pkg-message
 PKGINSTALL=	${WRKDIR}/pkg-install
 
@@ -67,6 +70,10 @@
 		embed_util embed_gdef embed_qli libfbclient extlib
 
 INSTALLS_SHLIB=	yes
+
+.if !defined(NOPORTDOCS)
+PORTDOCS=	*
+.endif
 .endif
 
 .include <bsd.port.pre.mk>
@@ -90,35 +97,14 @@
 	@${REINPLACE_CMD} -e 's|^\(LINK_OPTS +=.*\)$$|\1 -L${LOCALBASE}/lib|' \
 		${WRKSRC}/builds/posix/Makefile.in.inet_server
 
-post-build:
-	${SED} 's|%%PREFIX%%|${PREFIX}|g' \
-		< ${FILESDIR}/pkg-message.in \
-		> ${PKGMESSAGE}
-
-	${SED} -e 's|%%PREFIX%%|${PREFIX}/firebird|g' \
-		< ${FILESDIR}/pkg-install.in \
-		> ${PKGINSTALL}
-
-	${SED} -e "s|%%PREFIX%%|${PREFIX}/firebird|g" \
-		< ${FILESDIR}/aliases.conf.in \
-		> ${WRKDIR}/aliases.conf
-
 pre-install:
 	${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
 
 post-install:
 	${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
-	@${ECHO_MSG}
 	@${CAT} ${PKGMESSAGE}
-	@${ECHO_MSG}
 .endif
 
-patch-autotools:
-	@${DO_NADA}
-
-run-autotools:
-	@${DO_NADA}
-
 do-configure:
 	@(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} MAKE=${GMAKE}	\
 	${AUTOTOOLS_VARS} ./autogen.sh ${AUTOGENARGS})
@@ -126,6 +112,16 @@
 post-configure:
 	@${REINPLACE_CMD} -e 's|__attribute__ ((__unused__));||' \
 		${WRKSRC}/src/dsql/parse.cpp
+.if defined(CLIENT_ONLY)
+	@${REINPLACE_CMD} -e 's|firebird\.conf|etc/firebird.conf|g' \
+		${WRKSRC}/src/jrd/os/posix/config_root.cpp
+.else
+	@${REINPLACE_CMD} -e 's|firebird\.conf|../etc/firebird.conf|g' \
+		${WRKSRC}/src/jrd/os/posix/config_root.cpp
+.endif
+
+do-build:
+	@(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} ${GMAKE} ${ALL_TARGET})
 
 do-install:
 .if !defined(CLIENT_ONLY)
@@ -139,7 +135,6 @@
 .endfor
 
 	${INSTALL_DATA} ${WRKDIR}/aliases.conf ${PREFIX}/firebird/aliases.conf.sample
-	${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/firebird/firebird.conf.sample
 	${INSTALL_DATA} ${WRKSRC}/gen/firebird/security.fdb ${PREFIX}/firebird/security.fdb.sample
 	${CHMOD} 660 ${PREFIX}/firebird/security.fdb.sample
 
@@ -165,15 +160,14 @@
 
 .else
 
-.for dir in include share/doc/firebird \
-	  share/doc/firebird/sql.extensions share/examples/firebird
-	${MKDIR} ${PREFIX}/${dir}
-.endfor
-
 .for f in fb_lock_print gbak gdef gds_drop gfix gpre gsec gstat isql qli
 	${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/bin/${f} ${PREFIX}/bin
 .endfor
 
+	@${MKDIR} ${PREFIX}/etc
+	${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/etc
+	${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/etc/firebird.conf.sample
+
 	${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/lib/libfbclient.so.${PORTVERSION} ${PREFIX}/lib
 	${LN} -fs libfbclient.so.${PORTVERSION} ${PREFIX}/lib/libfbclient.so.1
 	${LN} -fs libfbclient.so.1 ${PREFIX}/lib/libfbclient.so
@@ -187,15 +181,20 @@
 
 	${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/lib/libib_util.so ${PREFIX}/lib
 
+	@${MKDIR} ${PREFIX}/include
 	${INSTALL_DATA} ${WRKSRC}/gen/firebird/include/*.h ${PREFIX}/include
 
-	${INSTALL_DATA} ${WRKSRC}/doc/WhatsNew ${PREFIX}/share/doc/firebird
-	${INSTALL_DATA} ${WRKSRC}/doc/README.* ${PREFIX}/share/doc/firebird
-	${INSTALL_DATA} ${WRKSRC}/doc/README.user ${PREFIX}/share/doc/firebird/README
-	${INSTALL_DATA} ${WRKSRC}/doc/sql.extensions/README.* ${PREFIX}/share/doc/firebird/sql.extensions
+.if !defined(NOPORTDOCS)
+	@${MKDIR} ${DOCSDIR}/sql.extensions
+	${INSTALL_DATA} ${WRKSRC}/doc/WhatsNew ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/doc/README.* ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/doc/README.user ${DOCSDIR}/README
+	${INSTALL_DATA} ${WRKSRC}/doc/sql.extensions/README.* ${DOCSDIR}/sql.extensions
+.endif
 
 	# Install examples
-	${INSTALL_DATA} ${WRKSRC}/gen/firebird/examples/v5/* ${PREFIX}/share/examples/firebird
+	@${MKDIR} ${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/gen/firebird/examples/v5/* ${EXAMPLESDIR}
 .endif
 
 .include <bsd.port.post.mk>
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/databases/firebird-server/pkg-plist,v
retrieving revision 1.9
diff -u -r1.9 pkg-plist
--- pkg-plist	17 May 2005 16:02:37 -0000	1.9
+++ pkg-plist	19 May 2005 15:35:48 -0000
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
 firebird/RELNOTES
 firebird/UDF/fbudf.so
 firebird/UDF/fbudf.sql
@@ -8,9 +9,6 @@
 @exec [ -f %B/aliases.conf ] || cp %B/%f %B/aliases.conf
 firebird/bin/fb_inet_server
 firebird/bin/fb_lock_mgr
-@unexec if cmp -s %D/firebird/firebird.conf %D/firebird/firebird.conf.sample; then rm -f %D/firebird/firebird.conf; fi
-firebird/firebird.conf.sample
-@exec [ -f %B/firebird.conf ] || cp %B/%f %B/firebird.conf
 @unexec [ -s %D/firebird/firebird.log ] || rm -f %D/firebird/firebird.log
 firebird/firebird.msg
 firebird/help/help.fdb
Index: pkg-plist.client
===================================================================
RCS file: /home/ncvs/ports/databases/firebird-server/pkg-plist.client,v
retrieving revision 1.1
diff -u -r1.1 pkg-plist.client
--- pkg-plist.client	17 May 2005 16:02:37 -0000	1.1
+++ pkg-plist.client	19 May 2005 15:35:48 -0000
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
 bin/fb_lock_print
 bin/gbak
 bin/gdef
@@ -23,30 +24,9 @@
 lib/libgds.so
 lib/libgds.so.1
 lib/libib_util.so
-%%DOCSDIR%%/README.NTSecurity
-%%DOCSDIR%%/README.Win32LibraryInstallation.txt
-%%DOCSDIR%%/README.build.mingw.html
-%%DOCSDIR%%/README.build.msvc.html
-%%DOCSDIR%%/README.install.Solaris_on_Intel
-%%DOCSDIR%%/README.instsvc
-%%DOCSDIR%%/README.makefiles
-%%DOCSDIR%%/README.user
-%%DOCSDIR%%/README.user.embedded
-%%DOCSDIR%%/README.user.troubleshooting
-%%DOCSDIR%%/README
-%%DOCSDIR%%/WhatsNew
-%%DOCSDIR%%/sql.extensions/README.aggregate_tracking
-%%DOCSDIR%%/sql.extensions/README.case
-%%DOCSDIR%%/sql.extensions/README.coalesce
-%%DOCSDIR%%/sql.extensions/README.context_variables
-%%DOCSDIR%%/sql.extensions/README.data_types
-%%DOCSDIR%%/sql.extensions/README.exception_handling
-%%DOCSDIR%%/sql.extensions/README.execute_statement
-%%DOCSDIR%%/sql.extensions/README.explicit_locks
-%%DOCSDIR%%/sql.extensions/README.nullif
-%%DOCSDIR%%/sql.extensions/README.order_by_expressions_nulls
-%%DOCSDIR%%/sql.extensions/README.savepoints
-%%DOCSDIR%%/sql.extensions/README.universal_triggers
+etc/firebird.conf.sample
+@exec [ -f %B/firebird.conf ] || cp %B/%f %B/firebird.conf
+@unexec if cmp -s %D/etc/firebird.conf %D/etc/firebird.conf.sample; then rm -f %D/etc/firebird.conf; fi
 %%EXAMPLESDIR%%/align.h
 %%EXAMPLESDIR%%/api1.c
 %%EXAMPLESDIR%%/api10.c
@@ -94,6 +74,4 @@
 %%EXAMPLESDIR%%/stat9.e
 %%EXAMPLESDIR%%/udf.sql
 %%EXAMPLESDIR%%/udflib.c
-@dirrm %%DOCSDIR%%/sql.extensions
-@dirrm %%DOCSDIR%%
 @dirrm %%EXAMPLESDIR%%
Index: files/pkg-install.in
===================================================================
RCS file: /home/ncvs/ports/databases/firebird-server/files/pkg-install.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-install.in
--- files/pkg-install.in	17 May 2005 16:02:37 -0000	1.1
+++ files/pkg-install.in	19 May 2005 15:35:48 -0000
@@ -1,4 +1,7 @@
 #!/bin/sh
+#
+# $FreeBSD$
+#
 
 PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:%%PREFIX%%/bin
 PREFIX=%%PREFIX%%
@@ -50,21 +53,4 @@
 		chown ${USER}:${GROUP} ${PREFIX}/$f
 		chmod 660 ${PREFIX}/${f}
 	done
-
-	# add the gds service and restart inetd
-	cat /etc/services | grep -v gds_db > /etc/services.new
-	cat >>/etc/services.new <<EOF
-gds_db          3050/tcp  #InterBase Database Remote Protocol
-EOF
-	mv /etc/services.new /etc/services
-
-	cat /etc/inetd.conf | grep -v gds_db > /etc/inetd.conf.new
-	cat >>/etc/inetd.conf.new <<EOF
-gds_db  stream  tcp     nowait  firebird        ${PREFIX}/bin/fb_inet_server  fb_inet_server
-EOF
-	mv /etc/inetd.conf.new /etc/inetd.conf
-
-	if [ -f /var/run/inetd.pid ]; then
-	        kill -HUP `cat /var/run/inetd.pid`
-	fi
 esac
Index: files/pkg-message.in
===================================================================
RCS file: /home/ncvs/ports/databases/firebird-server/files/pkg-message.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-message.in
--- files/pkg-message.in	17 May 2005 16:02:37 -0000	1.1
+++ files/pkg-message.in	19 May 2005 15:35:48 -0000
@@ -1,8 +1,20 @@
+
 ---------------------------------------------------------
-Firebird is now installed.  A symbolic link from
-/usr/interbase -> %%PREFIX%%/firebird may be needed
-for compatibility with existing programs that use
-Firebird.
+Firebird is now installed.
+
+To start the server add the following line to /etc/services:
+
+gds_db		3050/tcp  #InterBase Database Remote Protocol
+
+And add the following line to /etc/inetd.conf
+
+gds_db	stream	tcp	nowait	firebird	%%PREFIX%%/firebird/bin/fb_inet_server  fb_inet_server
+
+And finally restart inetd.
+
+A symbolic link from /usr/interbase -> %%PREFIX%%/firebird
+may be needed for compatibility with existing programs
+that use Firebird.
 
 The symbolic link can be created with:
 
@@ -20,3 +32,4 @@
 
 See %%PREFIX%%/firebird/RELNOTES for more.
 ---------------------------------------------------------
+
--- firebird-server.diff ends here ---

Thanks
-- 
Renato Botelho <freebsd at galle dot com dot br>
AIM: RBGargaBR | ICQ: 54596223
GnuPG Key: http://www.galle.com.br/~renato/pubkey.asc

I have learned
To spell hors d'oeuvres
Which still grates on
Some people's n'oeuvres.
		-- Warren Knox
Comment 2 Sergey Matveychuk freebsd_committer freebsd_triage 2005-05-20 18:34:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sem

Take it
Comment 3 Sergey Matveychuk freebsd_committer freebsd_triage 2005-05-21 09:01:49 UTC
State Changed
From-To: open->closed

Committed, thanks!