Changeset: 27d52e3434e7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/27d52e3434e7
Modified Files:
        MonetDB.spec
        NT/mkodbcwxs.py
        NT/mksqlwxs.py
        clients/NT/mclient.bat.in
        clients/NT/msqldump.bat.in
        clients/mapiclient/CMakeLists.txt
        clients/mapilib/CMakeLists.txt
        clients/mapilib/monetdb-mapi.pc.in
        common/stream/CMakeLists.txt
        common/stream/monetdb-stream.pc.in
        gdk/CMakeLists.txt
        gdk/monetdb-gdk.pc.in
        geom/monetdb5/CMakeLists.txt
        monetdb5/NT/M5server.bat.in
        monetdb5/extras/mal_optimizer_template/CMakeLists.txt
        monetdb5/extras/rapi/CMakeLists.txt
        monetdb5/modules/kernel/CMakeLists.txt
        monetdb5/tools/CMakeLists.txt
        monetdb5/tools/monetdb5.pc.in
        sql/backends/monet5/CMakeLists.txt
        sql/backends/monet5/UDF/capi/CMakeLists.txt
        sql/backends/monet5/UDF/pyapi3/CMakeLists.txt
        sql/backends/monet5/UDF/udf/CMakeLists.txt
        sql/backends/monet5/generator/CMakeLists.txt
        sql/backends/monet5/vaults/csv/CMakeLists.txt
        sql/backends/monet5/vaults/fits/CMakeLists.txt
        sql/backends/monet5/vaults/netcdf/CMakeLists.txt
        sql/backends/monet5/vaults/shp/CMakeLists.txt
        tools/merovingian/client/CMakeLists.txt
        tools/merovingian/daemon/CMakeLists.txt
        tools/merovingian/daemon/config/monetdbd.service.in
        tools/mserver/CMakeLists.txt
Branch: default
Log Message:

Use CMake target property to create versioned binary + symlink.
Also, add a dash to the .so names before the version number so that they
look like the names CMake uses for the binaries.


diffs (truncated from 584 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -548,7 +548,7 @@ embedded library (%{name}-embedded).
 %defattr(-,root,root)
 %{_libdir}/libmonetdb5*.so.*
 %{_libdir}/libmonetdbsql*.so*
-%dir %{_libdir}/monetdb5%{version}
+%dir %{_libdir}/monetdb5-%{version}
 %if %{with cintegration}
 %{_libdir}/monetdb5*/lib_capi.so
 %endif
@@ -939,11 +939,6 @@ rm -f %{buildroot}%{_libdir}/monetdb5*/l
 rm -f %{buildroot}%{_bindir}/monetdb_mtest.sh
 rm -rf %{buildroot}%{_datadir}/monetdb # /cmake
 
-for f in monetdbd monetdb mserver5 mclient msqldump; do
-    mv %{buildroot}%{_bindir}/${f} %{buildroot}%{_bindir}/${f}%{version}
-    ln -s ${f}%{version} %{buildroot}%{_bindir}/${f}
-done
-
 if [ -x /usr/sbin/hardlink ]; then
     /usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
 else
diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py
--- a/NT/mkodbcwxs.py
+++ b/NT/mkodbcwxs.py
@@ -89,10 +89,10 @@ def main():
     id = 1
     print(r'            <Directory Id="lib" Name="lib">')
     id = comp(features, id, 14,
-              [rf'bin\mapi{version}.dll', rf'lib\mapi{version}.pdb',
+              [rf'bin\mapi-{version}.dll', rf'lib\mapi-{version}.pdb',
                r'lib\MonetODBC.dll', r'lib\MonetODBC.pdb',
                r'lib\MonetODBCs.dll', r'lib\MonetODBCs.pdb',
-               rf'bin\stream{version}.dll', rf'lib\stream{version}.pdb',
+               rf'bin\stream-{version}.dll', rf'lib\stream-{version}.pdb',
                vcpkg.format(r'bin\iconv-2.dll'),
                vcpkg.format(r'bin\bz2.dll'),
                vcpkg.format(r'bin\charset-1.dll'), # for iconv-2.dll
diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -102,12 +102,12 @@ def main():
     print(r'      </DirectorySearch>')
     print(r'    </Property>')
     print(r'    <Property Id="GEOMMALEXISTS">')
-    print(rf'      <DirectorySearch Id="CheckFileDir3" 
Path="[INSTALLDIR]\lib\monetdb5{version}" Depth="0">')
+    print(rf'      <DirectorySearch Id="CheckFileDir3" 
Path="[INSTALLDIR]\lib\monetdb5-{version}" Depth="0">')
     print(r'        <FileSearch Id="CheckFile3" Name="geom.mal"/>')
     print(r'      </DirectorySearch>')
     print(r'    </Property>')
     print(r'    <Property Id="GEOMLIBEXISTS">')
-    print(rf'      <DirectorySearch Id="CheckFileDir4" 
Path="[INSTALLDIR]\lib\monetdb5{version}" Depth="0">')
+    print(rf'      <DirectorySearch Id="CheckFileDir4" 
Path="[INSTALLDIR]\lib\monetdb5-{version}" Depth="0">')
     print(r'        <FileSearch Id="CheckFile4" Name="_geom.dll"/>')
     print(r'      </DirectorySearch>')
     print(r'    </Property>')
@@ -153,12 +153,12 @@ def main():
               [r'bin\mclient.exe',
                r'bin\mserver5.exe',
                r'bin\msqldump.exe',
-               rf'bin\bat{version}.dll',
-               rf'bin\mapi{version}.dll',
-               rf'bin\monetdb5{version}.dll',
+               rf'bin\bat-{version}.dll',
+               rf'bin\mapi-{version}.dll',
+               rf'bin\monetdb5-{version}.dll',
                r'bin\monetdbe.dll',
-               rf'bin\monetdbsql{version}.dll',
-               rf'bin\stream{version}.dll',
+               rf'bin\monetdbsql-{version}.dll',
+               rf'bin\stream-{version}.dll',
                vcpkg.format(r'bin\iconv-2.dll'),
                vcpkg.format(r'bin\bz2.dll'),
                vcpkg.format(r'bin\charset-1.dll'), # for iconv-2.dll
@@ -174,11 +174,11 @@ def main():
               [r'bin\mclient.pdb',
                r'bin\mserver5.pdb',
                r'bin\msqldump.pdb',
-               rf'lib\bat{version}.pdb',
-               rf'lib\mapi{version}.pdb',
-               rf'lib\monetdb5{version}.pdb',
-               rf'lib\monetdbsql{version}.pdb',
-               rf'lib\stream{version}.pdb'])
+               rf'lib\bat-{version}.pdb',
+               rf'lib\mapi-{version}.pdb',
+               rf'lib\monetdb5-{version}.pdb',
+               rf'lib\monetdbsql-{version}.pdb',
+               rf'lib\stream-{version}.pdb'])
     id = comp(geom, id, 14,
               [vcpkg.format(r'bin\geos_c.dll'),
                vcpkg.format(r'bin\geos.dll')])
@@ -205,21 +205,21 @@ def main():
     print(r'            <Directory Id="lib" Name="lib">')
     print(r'              <Directory Id="monetdb5" Name="monetdb5">')
     id = comp(features, id, 16,
-              [rf'lib\monetdb5{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.dll') and ('geom' not in x) and ('pyapi' not 
in x) and ('opt_sql_append' not in x) and ('microbenchmark' not in x) and 
('udf' not in x), os.listdir(os.path.join(sys.argv[3], 'lib', 
f'monetdb5{version}'))))])
+              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.dll') and ('geom' not in x) and ('pyapi' not 
in x) and ('opt_sql_append' not in x) and ('microbenchmark' not in x) and 
('udf' not in x), os.listdir(os.path.join(sys.argv[3], 'lib', 
f'monetdb5-{version}'))))])
     id = comp(debug, id, 16,
-              [rf'lib\monetdb5{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.pdb') and ('geom' not in x) and 
('opt_sql_append' not in x) and ('microbenchmark' not in x) and ('udf' not in 
x), os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5{version}'))))])
+              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.pdb') and ('geom' not in x) and 
('opt_sql_append' not in x) and ('microbenchmark' not in x) and ('udf' not in 
x), os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5-{version}'))))])
     id = comp(geom, id, 16,
-              [rf'lib\monetdb5{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and (x.endswith('.dll') or x.endswith('.pdb')) and ('geom' in 
x), os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5{version}'))))])
+              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and (x.endswith('.dll') or x.endswith('.pdb')) and ('geom' in 
x), os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5-{version}'))))])
     id = comp(pyapi3, id, 16,
-              [rf'lib\monetdb5{version}\_pyapi3.dll'])
+              [rf'lib\monetdb5-{version}\_pyapi3.dll'])
     print(r'              </Directory>')
     id = comp(extend, id, 14,
-              [rf'lib\bat{version}.lib',
-               rf'lib\mapi{version}.lib',
-               rf'lib\monetdb5{version}.lib',
+              [rf'lib\bat-{version}.lib',
+               rf'lib\mapi-{version}.lib',
+               rf'lib\monetdb5-{version}.lib',
                r'lib\monetdbe.lib',
-               rf'lib\monetdbsql{version}.lib',
-               rf'lib\stream{version}.lib',
+               rf'lib\monetdbsql-{version}.lib',
+               rf'lib\stream-{version}.lib',
                vcpkg.format(r'lib\iconv.lib'),
                vcpkg.format(r'lib\bz2.lib'),
                vcpkg.format(r'lib\charset.lib'),
diff --git a/clients/NT/mclient.bat.in b/clients/NT/mclient.bat.in
--- a/clients/NT/mclient.bat.in
+++ b/clients/NT/mclient.bat.in
@@ -16,7 +16,7 @@ rem remove the final backslash from the 
 set MONETDB=%MONETDB:~0,-1%
 
 rem extend the search path with our EXE and DLL folders
-set PATH=%MONETDB%\bin;%MONETDB%\lib\monetdb5@MONETDB_VERSION@;%PATH%
+set PATH=%MONETDB%\bin;%MONETDB%\lib\monetdb5-@MONETDB_VERSION@;%PATH%
 
 if not "%1"=="/STARTED-FROM-MENU" goto skip
 shift
diff --git a/clients/NT/msqldump.bat.in b/clients/NT/msqldump.bat.in
--- a/clients/NT/msqldump.bat.in
+++ b/clients/NT/msqldump.bat.in
@@ -15,7 +15,7 @@
 @set MONETDB=%MONETDB:~0,-1%
 
 @rem extend the search path with our EXE and DLL folders
-@set PATH=%MONETDB%\bin;%MONETDB%\lib\monetdb5@MONETDB_VERSION@;%PATH%
+@set PATH=%MONETDB%\bin;%MONETDB%\lib\monetdb5-@MONETDB_VERSION@;%PATH%
 
 @rem start the real client
 @"%MONETDB%\bin\msqldump.exe" %*
diff --git a/clients/mapiclient/CMakeLists.txt 
b/clients/mapiclient/CMakeLists.txt
--- a/clients/mapiclient/CMakeLists.txt
+++ b/clients/mapiclient/CMakeLists.txt
@@ -83,6 +83,10 @@ target_link_libraries(msqldump
   mprompt
   $<$<PLATFORM_ID:Windows>:${GETOPT_LIB}>)
 
+set_target_properties(mclient msqldump
+  PROPERTIES
+  VERSION ${MONETDB_VERSION})
+
 install(TARGETS
   mclient
   msqldump
diff --git a/clients/mapilib/CMakeLists.txt b/clients/mapilib/CMakeLists.txt
--- a/clients/mapilib/CMakeLists.txt
+++ b/clients/mapilib/CMakeLists.txt
@@ -59,7 +59,7 @@ target_compile_definitions(mapi
 
 set_target_properties(mapi
   PROPERTIES
-  OUTPUT_NAME mapi${MONETDB_VERSION}
+  OUTPUT_NAME mapi-${MONETDB_VERSION}
   VERSION ${MAPI_VERSION}
   SOVERSION ${MAPI_VERSION_MAJOR}
   PUBLIC_HEADER "mapi.h;mapi_querytype.h;msettings.h")
diff --git a/clients/mapilib/monetdb-mapi.pc.in 
b/clients/mapilib/monetdb-mapi.pc.in
--- a/clients/mapilib/monetdb-mapi.pc.in
+++ b/clients/mapilib/monetdb-mapi.pc.in
@@ -18,5 +18,5 @@ URL: https://www.monetdb.org/
 Version: @MONETDB_VERSION@
 Requires.private: monetdb-stream = @MONETDB_VERSION@
 
-Libs: -L${libdir} -lmapi@MONETDB_VERSION@
+Libs: -L${libdir} -lmapi-@MONETDB_VERSION@
 Cflags: -I${includedir}/monetdb
diff --git a/common/stream/CMakeLists.txt b/common/stream/CMakeLists.txt
--- a/common/stream/CMakeLists.txt
+++ b/common/stream/CMakeLists.txt
@@ -74,7 +74,7 @@ target_link_libraries(stream
 
 set_target_properties(stream
   PROPERTIES
-  OUTPUT_NAME stream${MONETDB_VERSION}
+  OUTPUT_NAME stream-${MONETDB_VERSION}
   VERSION ${STREAM_VERSION}
   SOVERSION ${STREAM_VERSION_MAJOR}
   PUBLIC_HEADER "${stream_public_headers}")
diff --git a/common/stream/monetdb-stream.pc.in 
b/common/stream/monetdb-stream.pc.in
--- a/common/stream/monetdb-stream.pc.in
+++ b/common/stream/monetdb-stream.pc.in
@@ -18,6 +18,6 @@ URL: https://www.monetdb.org/
 Version: @MONETDB_VERSION@
 Requires.private: @PKG_ZLIB@ @PKG_BZIP2@ @PKG_LZMA@
 
-Libs: -L${libdir} -lstream@MONETDB_VERSION@
+Libs: -L${libdir} -lstream-@MONETDB_VERSION@
 Libs.private: @SOCKET_LIBS@
 Cflags: -I${includedir}/monetdb
diff --git a/gdk/CMakeLists.txt b/gdk/CMakeLists.txt
--- a/gdk/CMakeLists.txt
+++ b/gdk/CMakeLists.txt
@@ -126,7 +126,7 @@ target_compile_definitions(bat
 
 set_target_properties(bat
   PROPERTIES
-  OUTPUT_NAME bat${MONETDB_VERSION}
+  OUTPUT_NAME bat-${MONETDB_VERSION}
   VERSION ${GDK_VERSION}
   SOVERSION ${GDK_VERSION_MAJOR}
   PUBLIC_HEADER "${gdk_public_headers}")
diff --git a/gdk/monetdb-gdk.pc.in b/gdk/monetdb-gdk.pc.in
--- a/gdk/monetdb-gdk.pc.in
+++ b/gdk/monetdb-gdk.pc.in
@@ -18,6 +18,6 @@ URL: https://www.monetdb.org/
 Version: @MONETDB_VERSION@
 Requires.private: monetdb-stream = @MONETDB_VERSION@
 
-Libs: -L${libdir} -lbat@MONETDB_VERSION@
+Libs: -L${libdir} -lbat-@MONETDB_VERSION@
 Libs.private: -lm @CMAKE_THREAD_LIBS_INIT@ -l@CMAKE_DL_LIBS@
 Cflags: -I${includedir}/monetdb
diff --git a/geom/monetdb5/CMakeLists.txt b/geom/monetdb5/CMakeLists.txt
--- a/geom/monetdb5/CMakeLists.txt
+++ b/geom/monetdb5/CMakeLists.txt
@@ -70,10 +70,10 @@ if(GEOS_FOUND)
   install(TARGETS
     geomodule
     LIBRARY
-    DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5${MONETDB_VERSION}
+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5-${MONETDB_VERSION}
     COMPONENT geom
     ARCHIVE
-    DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5${MONETDB_VERSION}
+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5-${MONETDB_VERSION}
     PUBLIC_HEADER
     DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monetdb
     INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
@@ -81,7 +81,7 @@ if(GEOS_FOUND)
   if(WIN32)
     install(FILES
       $<TARGET_PDB_FILE:geomodule>
-      DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5${MONETDB_VERSION}
+      DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5-${MONETDB_VERSION}
       OPTIONAL)
   endif()
 endif()
diff --git a/monetdb5/NT/M5server.bat.in b/monetdb5/NT/M5server.bat.in
--- a/monetdb5/NT/M5server.bat.in
+++ b/monetdb5/NT/M5server.bat.in
@@ -19,7 +19,7 @@ rem remove the final backslash from the 
 set MONETDB=%MONETDB:~0,-1%
 
 rem extend the search path with our EXE and DLL folders
-set PATH=%MONETDB%\bin;%MONETDB%\lib\monetdb5@MONETDB_VERSION@;%PATH%
+set PATH=%MONETDB%\bin;%MONETDB%\lib\monetdb5-@MONETDB_VERSION@;%PATH%
 
 rem prepare the arguments to mserver5 to tell it where to put the dbfarm
 
diff --git a/monetdb5/extras/mal_optimizer_template/CMakeLists.txt 
b/monetdb5/extras/mal_optimizer_template/CMakeLists.txt
--- a/monetdb5/extras/mal_optimizer_template/CMakeLists.txt
+++ b/monetdb5/extras/mal_optimizer_template/CMakeLists.txt
@@ -42,12 +42,12 @@ set_target_properties(opt_sql_append
 
 install(TARGETS
   opt_sql_append
-  DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5${MONETDB_VERSION}
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5-${MONETDB_VERSION}
   COMPONENT server)
 
 if(WIN32)
   install(FILES
     $<TARGET_PDB_FILE:opt_sql_append>
-    DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5${MONETDB_VERSION}
+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5-${MONETDB_VERSION}
     OPTIONAL)
 endif()
diff --git a/monetdb5/extras/rapi/CMakeLists.txt 
b/monetdb5/extras/rapi/CMakeLists.txt
--- a/monetdb5/extras/rapi/CMakeLists.txt
+++ b/monetdb5/extras/rapi/CMakeLists.txt
@@ -51,19 +51,19 @@ if(LIBR_FOUND)
   install(TARGETS
     rapi
     DESTINATION
-    ${CMAKE_INSTALL_LIBDIR}/monetdb5${MONETDB_VERSION}
+    ${CMAKE_INSTALL_LIBDIR}/monetdb5-${MONETDB_VERSION}
     COMPONENT rapi)
 
   install(FILES
     rapi.R
     DESTINATION
-    ${CMAKE_INSTALL_LIBDIR}/monetdb5${MONETDB_VERSION}
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to