initial fossil scm support for feeds and repository downloads.
authorRISCi_ATOM <bob@bobcall.me>
Fri, 20 May 2016 04:23:29 +0000 (04:23 +0000)
committerRISCi_ATOM <bob@bobcall.me>
Fri, 20 May 2016 04:23:29 +0000 (04:23 +0000)
libreCMC fossil package feed is added in a hackish way.

trunk/feeds.conf
trunk/include/download.mk
trunk/scripts/feeds

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4fd88b33b0b504144ce1b8166dc9ad70478ec42a 100644 (file)
@@ -0,0 +1 @@
+src-fossil packages https://librecmc.org/librecmc-feeds
index 00d62602d21a7f4af97f8b19fb440b250d0d27c4..a527e1bb784091ecfc09a687ba9248dfd78dcaf8 100644 (file)
@@ -19,8 +19,10 @@ $(strip \
         $(if $(filter svn://%,$(1)),svn, \
           $(if $(filter cvs://%,$(1)),cvs, \
             $(if $(filter hg://%,$(1)),hg, \
-              $(if $(filter sftp://%,$(1)),bzr, \
+             $(if $(filter https://%,$(1)),fossil, \
+               $(if $(filter sftp://%,$(1)),bzr, \
                 unknown \
+               ) \
               ) \
             ) \
           ) \
@@ -84,21 +86,41 @@ define DownloadMethod/svn
        )
 endef
 
+define DownloadMethod/fossil
+        $(call wrap_mirror, \
+                echo "Checking out files from the fossil repository..."; \
+                mkdir -p $(TMP_DIR)/dl && \
+                cd $(TMP_DIR)/dl && \
+                rm -rf $(SUBDIR) && \
+                [ \! -d $(SUBDIR) ] && \
+               fossil clone $(URL) $(SUBDIR).fossil && \
+               mkdir $(SUBDIR) && \
+               cd $(SUBDIR) && \
+               fossil open ../$(SUBDIR).fossil && \
+               rm .fslckout && \
+               cd .. $$ \
+                echo "Packing checkout..." && \
+                $(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
+                mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
+                rm -rf $(SUBDIR); \
+        )
+endef
+
 define DownloadMethod/git
-       $(call wrap_mirror, \
-               echo "Checking out files from the git repository..."; \
-               mkdir -p $(TMP_DIR)/dl && \
-               cd $(TMP_DIR)/dl && \
-               rm -rf $(SUBDIR) && \
-               [ \! -d $(SUBDIR) ] && \
-               git clone $(URL) $(SUBDIR) --recursive && \
-               (cd $(SUBDIR) && git checkout $(VERSION) && git submodule update) && \
-               echo "Packing checkout..." && \
-               rm -rf $(SUBDIR)/.git && \
-               $(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
-               mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
-               rm -rf $(SUBDIR); \
-       )
+        $(call wrap_mirror, \
+                echo "Checking out files from the git repository..."; \
+                mkdir -p $(TMP_DIR)/dl && \
+                cd $(TMP_DIR)/dl && \
+                rm -rf $(SUBDIR) && \
+                [ \! -d $(SUBDIR) ] && \
+                git clone $(URL) $(SUBDIR) --recursive && \
+                (cd $(SUBDIR) && git checkout $(VERSION) && git submodule update) && \
+                echo "Packing checkout..." && \
+                rm -rf $(SUBDIR)/.git && \
+                $(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
+                mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
+                rm -rf $(SUBDIR); \
+        )
 endef
 
 define DownloadMethod/bzr
index 9d8c4104bc3158849dc4e0beecd792b5b140ef4f..811a9f7264d9798d0e07ae929cae0ac78c60de84 100755 (executable)
@@ -121,6 +121,9 @@ my %update_method = (
                'init'          => "ln -s '%s' '%s'",
                'update'        => "",
                'revision'      => "echo -n 'local'"},
+       'src-fossil' => {
+               'init'          => "fossil clone '%s' 'feeds/packages.fossil' && mkdir feeds/packages && cd feeds/packages && fossil open ../packages.fossil",
+               'update'        => "fossil pull"},
        'src-git' => {
                'init'          => "git clone --depth 1 '%s' '%s'",
                'init_branch'   => "git clone --depth 1 --branch '%s' '%s' '%s'",