insert addon rsnapshot

Message ID 20230313095452.847247-1-gerd@hoerst.net
State New
Headers
Series insert addon rsnapshot |

Commit Message

Gerd Hoerst March 13, 2023, 9:54 a.m. UTC
  Signed-off-by: Gerd Hoerst <gerd@hoerst.net>
---
 config/rootfiles/packages/rsnapshot |  5 ++
 lfs/rsnapshot                       | 88 +++++++++++++++++++++++++++++
 make.sh                             |  1 +
 src/paks/rsnapshot/install.sh       | 27 +++++++++
 src/paks/rsnapshot/uninstall.sh     | 26 +++++++++
 src/paks/rsnapshot/update.sh        | 26 +++++++++
 6 files changed, 173 insertions(+)
 create mode 100644 config/rootfiles/packages/rsnapshot
 create mode 100644 lfs/rsnapshot
 create mode 100644 src/paks/rsnapshot/install.sh
 create mode 100644 src/paks/rsnapshot/uninstall.sh
 create mode 100644 src/paks/rsnapshot/update.sh
  

Patch

diff --git a/config/rootfiles/packages/rsnapshot b/config/rootfiles/packages/rsnapshot
new file mode 100644
index 000000000..f9d833b6e
--- /dev/null
+++ b/config/rootfiles/packages/rsnapshot
@@ -0,0 +1,5 @@ 
+usr/bin/rsnapshot
+usr/bin/rsnapshot-diff
+etc/rsnapshot.conf.default
+#usr/share/man/man1/rsnapshot-diff.1
+#usr/share/man/man1/rsnapshot.1
diff --git a/lfs/rsnapshot b/lfs/rsnapshot
new file mode 100644
index 000000000..b5d61bbce
--- /dev/null
+++ b/lfs/rsnapshot
@@ -0,0 +1,88 @@ 
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2020  IPFire Team  <info@ipfire.org>                     #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 1.4.5
+
+THISAPP    = rsnapshot-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = https://github.com/rsnapshot/rsnapshot/releases/download/1.4.5
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = rsnapshot
+PAK_VER    = 1
+DEPS       = "rsync"
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_BLAKE2 = 2a668aa16991b2b4e611c6204cdcd0e8c9593e5f0af5ea89e787a578e73b6f5987514cd7d0252bb78aea1b157ef85aea947686111ca9e3befdb2a8cef0aa9ecd
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+b2 : $(subst %,%_BLAKE2,$(objects))
+
+dist: 
+	@$(PAK)
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+	@$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && \
+		./configure \
+		--prefix=/usr \
+		--sysconfdir=/etc
+		--mandir=/usr/share/man \
+
+	cd $(DIR_APP) && make $(MAKETUNING)
+	cd $(DIR_APP) && make install
+
+# 	cp -avf $(DIR_CONF)/rsnapshot/etc/* /etc/
+
+	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
diff --git a/make.sh b/make.sh
index c083f7fcc..7b9561aba 100755
--- a/make.sh
+++ b/make.sh
@@ -1506,6 +1506,7 @@  buildipfire() {
   lfsmake2 libmpeg2
   lfsmake2 gnump3d
   lfsmake2 rsync
+  lfsmake2 rsnapshot
   lfsmake2 rpcbind
   lfsmake2 keyutils
   lfsmake2 nfs
diff --git a/src/paks/rsnapshot/install.sh b/src/paks/rsnapshot/install.sh
new file mode 100644
index 000000000..9aafb0d56
--- /dev/null
+++ b/src/paks/rsnapshot/install.sh
@@ -0,0 +1,27 @@ 
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh 
+
+extract_files 
+restore_backup ${NAME}
diff --git a/src/paks/rsnapshot/uninstall.sh b/src/paks/rsnapshot/uninstall.sh
new file mode 100644
index 000000000..66f4344eb
--- /dev/null
+++ b/src/paks/rsnapshot/uninstall.sh
@@ -0,0 +1,26 @@ 
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+make_backup ${NAME}
+remove_files
diff --git a/src/paks/rsnapshot/update.sh b/src/paks/rsnapshot/update.sh
new file mode 100644
index 000000000..89c40d0d7
--- /dev/null
+++ b/src/paks/rsnapshot/update.sh
@@ -0,0 +1,26 @@ 
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh