OSDN Git Service

Use XML templates to adapt to download host changes.
authorKeith Marshall <keith@users.osdn.me>
Fri, 12 Jun 2020 21:15:08 +0000 (22:15 +0100)
committerKeith Marshall <keith@users.osdn.me>
Fri, 12 Jun 2020 21:15:08 +0000 (22:15 +0100)
ChangeLog
Makefile.in
configure.ac
src/setup.rc
xml/profile.xml.in [moved from xml/profile.xml with 96% similarity]
xml/setup.xml.in [moved from xml/setup.xml with 91% similarity]

index 758594c..3ca25b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2020-06-12  Keith Marshall  <keith@users.osdn.me>
+
+       Use XML templates to adapt to download host changes.
+
+       * configure.ac (MINGW_PACKAGE_DIST_URL): Update to OSDN host URL.
+
+       * xml/profile.xml: Rename it as...
+       * xml/profile.xml.in: ...this; replace hard-coded repository URL...
+       (%PACKAGE_LIST_URL%/%F.xml.lzma): ...this template.
+
+       * xml/setup.xml: Likewise, rename it as...
+       * xml/setup.xml.in: ...this, with corresponding URL update.
+
+       * Makefile.in (install-profile): Modify procedure, using...
+       (%.xml: %.xml.in): ...this new pattern rule, to generate installed XML
+       files, from source templates.
+
+       * src/setup.rc (STRINGTABLE) <ID_DOWNLOAD_HOST_URI>: Remove trailing
+       "?download" qualifier.
+
 2020-06-11  Keith Marshall  <keith@users.osdn.me>
 
        Discontinue formal use of the build-aux submodule.
index 25f32ff..9b86207 100644 (file)
@@ -357,9 +357,12 @@ install: installdirs install-profile
          $(INSTALL_DATA) $$image ${libexecdir}/${PACKAGE_TARNAME}; \
          done
 
-install-profile:
-       $(INSTALL_DATA) ${srcdir}/xml/profile.xml \
-         ${PACKAGE_CONFIG_DIR}/defaults.xml
+vpath %.xml.in ${srcdir}/xml
+install-profile: install-%: %.xml
+       $(INSTALL_DATA) $*.xml ${PACKAGE_CONFIG_DIR}/defaults.xml
+
+%.xml: %.xml.in
+       $(TAG_SCRIPT) $< > $@
 
 install-strip: install
        for image in $(BIN_PROGRAMS); do \
index 9b36689..4c7aca7 100644 (file)
@@ -33,7 +33,7 @@
 # at configure time, by specifying alternatives for either, or both of
 # the precious variables, PACKAGE_DIST_DOMAIN and PACKAGE_DIST_DIR.
 #
-  MINGW_AC_PACKAGE_DIST_URL([http://prdownloads.sourceforge.net],[mingw])
+  MINGW_AC_PACKAGE_DIST_URL([https://osdn.net],[dl/mingw])
 
 # Identify the formal release classes for each of the CLI and the GUI
 # application sub-packages; these may be overriden at configure time,
index 709ff31..1f273ac 100644 (file)
@@ -3,8 +3,8 @@
  *
  * $Id$
  *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- * Copyright (C) 2013, MinGW.org Project
+ * Written by Keith Marshall <keith@users.osdn.me>
+ * Copyright (C) 2013, 2017, 2020, MinGW.org Project
  *
  *
  * Resource definitions for the mingw-get-setup.exe implementation.
@@ -93,9 +93,9 @@ STRINGTABLE DISCARDABLE
     ID_MAIN_WINDOW_CLASS               "mingw-get"
     ID_MAIN_WINDOW_CAPTION             "MinGW Installation Manager"
     ID_MAIN_DIALOGUE_CAPTION            VERINFO_FILE_DESCRIPTION
-    ID_DOWNLOAD_HOST_URI               "%PACKAGE_DIST_URL%/%F?download"
     ID_PACKAGE_BASE_DISTNAME           "%PACKAGE_BASE_DISTNAME%"
     ID_PACKAGE_DATA_DISTNAME           "%PACKAGE_DATA_DISTNAME%"
+    ID_DOWNLOAD_HOST_URI               "%PACKAGE_DIST_URL%/%F"
     ID_FONT_PREF                       "Verdana"
   END
 
similarity index 96%
rename from xml/profile.xml
rename to xml/profile.xml.in
index 9d341b3..04b9ad8 100644 (file)
@@ -3,8 +3,8 @@
   <!--
     $Id$
 
-    Written by Keith Marshall  <keithmarshall@users.sourceforge.net>
-    Copyright (C) 2009, 2010, 2012, 2013, MinGW.org Project
+    Written by Keith Marshall  <keith@users.osdn.me>
+    Copyright (C) 2009-2013, 2017, 2020, MinGW.org Project
 
 
     Master configuration profile for mingw-get.
@@ -70,7 +70,7 @@
     <option name="start-menu" />
   </preferences>
 
-  <repository uri="http://prdownloads.sourceforge.net/mingw/%F.xml.lzma?download">
+  <repository uri="%PACKAGE_DIST_URL%/%F.xml.lzma">
     <!--
       The "repository" specification identifies the URI where package
       list catalogues may be downloaded; each catalogue download URI is
similarity index 91%
rename from xml/setup.xml
rename to xml/setup.xml.in
index 77ee0cc..332c070 100644 (file)
@@ -3,8 +3,8 @@
   <!--
     $Id$
 
-    Written by Keith Marshall  <keithmarshall@users.sourceforge.net>
-    Copyright (C) 2013, MinGW.org Project
+    Written by Keith Marshall  <keith@users.osdn.me>
+    Copyright (C) 2013, 2017, 2020, MinGW.org Project
 
 
     Initial configuration profile for mingw-get-setup.
@@ -24,7 +24,7 @@
     arising from the use of this software.
   -->
 
-  <repository uri="http://prdownloads.sourceforge.net/mingw/%F.xml.lzma?download">
+  <repository uri="%PACKAGE_DIST_URL%/%F.xml.lzma">
     <!--
       The "repository" specification identifies the URI whence package
       list catalogues may be downloaded; each catalogue download URI is