aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvanilla <vanilla@FreeBSD.org>2014-08-07 10:22:47 +0800
committervanilla <vanilla@FreeBSD.org>2014-08-07 10:22:47 +0800
commit6fa32df4f255246e693c26d5ca7a22f139a56bca (patch)
tree67752082d0e50ab67d7beb8eaaab6b6f3fb8a528
parent3ffe0ef97036cf8ed4db7be0ad6b23952f42e288 (diff)
downloadfreebsd-ports-gnome-6fa32df4f255246e693c26d5ca7a22f139a56bca.tar.gz
freebsd-ports-gnome-6fa32df4f255246e693c26d5ca7a22f139a56bca.tar.zst
freebsd-ports-gnome-6fa32df4f255246e693c26d5ca7a22f139a56bca.zip
Stagify.
-rw-r--r--sysutils/fsbackup/Makefile8
-rw-r--r--sysutils/fsbackup/files/patch-install.pl105
-rw-r--r--sysutils/fsbackup/pkg-plist1
3 files changed, 108 insertions, 6 deletions
diff --git a/sysutils/fsbackup/Makefile b/sysutils/fsbackup/Makefile
index da6ad7a58ea8..832568759065 100644
--- a/sysutils/fsbackup/Makefile
+++ b/sysutils/fsbackup/Makefile
@@ -17,15 +17,11 @@ USES= shebangfix perl5
SHEBANG_FILES= contrib/*.pl \
*.pl
-MAN1= fsbackup.1
-MANCOMPRESSED= no
-
NO_BUILD= yes
NO_INSTALL_MANPAGES=yes
-NO_STAGE= yes
do-install:
- @cd ${WRKSRC};./install.pl --prefix=${PREFIX}/fsbackup --prefix-man=${MANPREFIX}/man/man1
- @${RM} ${PREFIX}/fsbackup/fsbackup.1
+ @cd ${WRKSRC};./install.pl --prefix=${PREFIX}/fsbackup --prefix-man=${MANPREFIX}/man/man1 --dest=${STAGEDIR}
+ @${RM} ${STAGEDIR}${PREFIX}/fsbackup/fsbackup.1
.include <bsd.port.mk>
diff --git a/sysutils/fsbackup/files/patch-install.pl b/sysutils/fsbackup/files/patch-install.pl
new file mode 100644
index 000000000000..a56007d29f46
--- /dev/null
+++ b/sysutils/fsbackup/files/patch-install.pl
@@ -0,0 +1,105 @@
+--- install.pl.orig 2014-08-07 10:15:08.515422863 +0800
++++ install.pl 2014-08-07 10:20:46.374398334 +0800
+@@ -23,10 +23,11 @@ $default_install_man = "/usr/local/man/m
+ #-----------------------------------------------------------------------
+ use Getopt::Long;
+
+-GetOptions("prefix=s", \$prefix, "prefix-man=s", \$prefix_man);
++GetOptions("prefix=s", \$prefix, "prefix-man=s", \$prefix_man, "dest=s", \$dest);
+
+ $prefix = defined($prefix) ? $prefix : $default_install_path;
+ $prefix_man = defined($prefix_man) ? $prefix_man : $default_install_man;
++$dest = defined($dest) ? $dest : "";
+ print "Installing to $prefix (man to $prefix_man)\n";
+
+ chomp($prog_md5sum = `which md5sum`);
+@@ -47,51 +48,51 @@ chomp($backup_name = `uname -n|tr '.' '_
+ print "Makeing man page...\n";
+ system ("pod2man fsbackup.pl > fsbackup.1");
+ print "Installing man page to $prefix_man...\n";
+-system ("cp -f fsbackup.1 $prefix_man/fsbackup.1");
+-system ("chmod 644 $prefix_man/fsbackup.1");
++system ("cp -f fsbackup.1 $dest$prefix_man/fsbackup.1");
++system ("chmod 644 $dest$prefix_man/fsbackup.1");
+
+ print "Creation directory tree in $prefix...\n";
+
+-if (! -d $prefix){
+- system ("mkdir $prefix");
+- system ("chmod 755 $prefix");
++if (! -d "$dest$prefix") {
++ system ("mkdir $dest$prefix");
++ system ("chmod 755 $dest$prefix");
+ }
+-system ("mkdir $prefix/cache");
+-system ("chmod 700 $prefix/cache");
+-system ("mkdir $prefix/scripts");
+-system ("chmod 700 $prefix/scripts");
+-system ("mkdir $prefix/sys_backup");
+-system ("chmod 700 $prefix/sys_backup");
++system ("mkdir $dest$prefix/cache");
++system ("chmod 700 $dest$prefix/cache");
++system ("mkdir $dest$prefix/scripts");
++system ("chmod 700 $dest$prefix/scripts");
++system ("mkdir $dest$prefix/sys_backup");
++system ("chmod 700 $dest$prefix/sys_backup");
+
+ print "Installing fsbackup in $prefix...\n";
+
+-system ("cp -f FAQ $prefix/FAQ");
+-system ("chmod 644 $prefix/FAQ");
+-system ("cp -f README $prefix/README");
+-system ("chmod 644 $prefix/README");
+-system ("cp -f VERSION $prefix/VERSION");
+-system ("chmod 644 $prefix/VERSION");
+-system ("cp -f fsbackup.1 $prefix/fsbackup.1");
+-system ("chmod 644 $prefix/fsbackup.1");
+-
+-copyfile("fsbackup.pl", "$prefix/fsbackup.pl");
+-system ("chmod 711 $prefix/fsbackup.pl");
+-copyfile("cfg_example", "$prefix/cfg_example");
+-system ("chmod 600 $prefix/cfg_example");
+-copyfile("create_backup.sh", "$prefix/create_backup.sh");
+-system ("chmod 711 $prefix/create_backup.sh");
+-copyfile("scripts/mysql_backup.sh", "$prefix/scripts/mysql_backup.sh");
+-system ("chmod 711 $prefix/scripts/mysql_backup.sh");
+-copyfile("scripts/sysbackup.sh", "$prefix/scripts/sysbackup.sh");
+-system ("chmod 711 $prefix/scripts/sysbackup.sh");
+-copyfile("scripts/fsrestore.sh", "$prefix/scripts/fsrestore.sh");
+-system ("chmod 711 $prefix/scripts/fsrestore.sh");
+-copyfile("scripts/pgsql_backup.sh", "$prefix/scripts/pgsql_backup.sh");
+-system ("chmod 711 $prefix/scripts/pgsql_backup.sh");
+-copyfile("scripts/sysrestore.sh", "$prefix/scripts/sysrestore.sh");
+-system ("chmod 711 $prefix/scripts/sysrestore.sh");
+-copyfile("scripts/sqlite_backup.sh", "$prefix/scripts/sqlite_backup.sh");
+-system ("chmod 711 $prefix/scripts/sqlite_backup.sh");
++system ("cp -f FAQ $dest$prefix/FAQ");
++system ("chmod 644 $dest$prefix/FAQ");
++system ("cp -f README $dest$prefix/README");
++system ("chmod 644 $dest$prefix/README");
++system ("cp -f VERSION $dest$prefix/VERSION");
++system ("chmod 644 $dest$prefix/VERSION");
++system ("cp -f fsbackup.1 $dest$prefix/fsbackup.1");
++system ("chmod 644 $dest$prefix/fsbackup.1");
++
++copyfile("fsbackup.pl", "$dest$prefix/fsbackup.pl");
++system ("chmod 711 $dest$prefix/fsbackup.pl");
++copyfile("cfg_example", "$dest$prefix/cfg_example");
++system ("chmod 600 $dest$prefix/cfg_example");
++copyfile("create_backup.sh", "$dest$prefix/create_backup.sh");
++system ("chmod 711 $dest$prefix/create_backup.sh");
++copyfile("scripts/mysql_backup.sh", "$dest$prefix/scripts/mysql_backup.sh");
++system ("chmod 711 $dest$prefix/scripts/mysql_backup.sh");
++copyfile("scripts/sysbackup.sh", "$dest$prefix/scripts/sysbackup.sh");
++system ("chmod 711 $dest$prefix/scripts/sysbackup.sh");
++copyfile("scripts/fsrestore.sh", "$dest$prefix/scripts/fsrestore.sh");
++system ("chmod 711 $dest$prefix/scripts/fsrestore.sh");
++copyfile("scripts/pgsql_backup.sh", "$dest$prefix/scripts/pgsql_backup.sh");
++system ("chmod 711 $dest$prefix/scripts/pgsql_backup.sh");
++copyfile("scripts/sysrestore.sh", "$dest$prefix/scripts/sysrestore.sh");
++system ("chmod 711 $dest$prefix/scripts/sysrestore.sh");
++copyfile("scripts/sqlite_backup.sh", "$dest$prefix/scripts/sqlite_backup.sh");
++system ("chmod 711 $dest$prefix/scripts/sqlite_backup.sh");
+
+ print "* If you system not support MD5, please manually install module ./modules/Digest-Perl-MD5-1.5.tar.gz\n";
+ print "* If Berkeley DB not installed and failed compilation of DB_File-1.77.tar.gz, please manually install DB from http://www.sleepycat.com.\n";
diff --git a/sysutils/fsbackup/pkg-plist b/sysutils/fsbackup/pkg-plist
index bb3f04cc5765..c5a74c11e0f3 100644
--- a/sysutils/fsbackup/pkg-plist
+++ b/sysutils/fsbackup/pkg-plist
@@ -10,6 +10,7 @@ fsbackup/scripts/pgsql_backup.sh
fsbackup/scripts/sysbackup.sh
fsbackup/scripts/sysrestore.sh
fsbackup/scripts/sqlite_backup.sh
+man/man1/fsbackup.1.gz
@dirrm fsbackup/scripts
@dirrm fsbackup/cache
@dirrm fsbackup/sys_backup