Work on rpm package
This commit is contained in:
parent
b736dac1c2
commit
6d5c671904
@ -464,24 +464,24 @@ if ($nboftargetok) {
|
||||
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
|
||||
$ret=`$cmd`;
|
||||
|
||||
print "Fix filefunc.inc.php, install/inc.php, support/inc.php\n";
|
||||
$cmd="cat \"$BUILDROOT/$PROJECT/htdocs/filefunc.inc.php\" |
|
||||
sed -e 's/conffile = \"\\\.\\\.\\\/conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffile = \"conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffiletoshow = \"htdocs\\\/conf\\\/conf.php\"/conffiletoshow = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' > \"$BUILDROOT/$FILENAMETGZ2/htdocs/filefunc.inc.php\"";
|
||||
$ret=`$cmd`;
|
||||
$cmd="cat \"$BUILDROOT/$PROJECT/htdocs/install/inc.php\" |
|
||||
sed -e 's/conffile = \"\\\.\\\.\\\/conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffile = \"conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffiletoshow = \"htdocs\\\/conf\\\/conf.php\"/conffiletoshow = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' > \"$BUILDROOT/$FILENAMETGZ2/htdocs/install/inc.php\"";
|
||||
$ret=`$cmd`;
|
||||
$cmd="cat \"$BUILDROOT/$PROJECT/htdocs/support/inc.php\" |
|
||||
sed -e 's/conffile = \"\\\.\\\.\\\/conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffile = \"conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
sed -e 's/conffiletoshow = \"htdocs\\\/conf\\\/conf.php\"/conffiletoshow = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' > \"$BUILDROOT/$FILENAMETGZ2/htdocs/support/inc.php\"";
|
||||
$ret=`$cmd`;
|
||||
|
||||
print "Remove other files\n";
|
||||
# print "Fix filefunc.inc.php, install/inc.php, support/inc.php\n";
|
||||
# $cmd="cat \"$BUILDROOT/$PROJECT/htdocs/filefunc.inc.php\" |
|
||||
# sed -e 's/conffile = \"\\\.\\\.\\\/conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
# sed -e 's/conffile = \"conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
# sed -e 's/conffiletoshow = \"htdocs\\\/conf\\\/conf.php\"/conffiletoshow = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' > \"$BUILDROOT/$FILENAMETGZ2/htdocs/filefunc.inc.php\"";
|
||||
# $ret=`$cmd`;
|
||||
# $cmd="cat \"$BUILDROOT/$PROJECT/htdocs/install/inc.php\" |
|
||||
# sed -e 's/conffile = \"\\\.\\\.\\\/conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
# sed -e 's/conffile = \"conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
# sed -e 's/conffiletoshow = \"htdocs\\\/conf\\\/conf.php\"/conffiletoshow = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' > \"$BUILDROOT/$FILENAMETGZ2/htdocs/install/inc.php\"";
|
||||
# $ret=`$cmd`;
|
||||
# $cmd="cat \"$BUILDROOT/$PROJECT/htdocs/support/inc.php\" |
|
||||
# sed -e 's/conffile = \"\\\.\\\.\\\/conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
# sed -e 's/conffile = \"conf\\\/conf.php\"/conffile = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' |
|
||||
# sed -e 's/conffiletoshow = \"htdocs\\\/conf\\\/conf.php\"/conffiletoshow = \"\\\/etc\\\/dolibarr\\\/conf.php\"/g' > \"$BUILDROOT/$FILENAMETGZ2/htdocs/support/inc.php\"";
|
||||
# $ret=`$cmd`;
|
||||
|
||||
#print "Remove other files\n";
|
||||
#$ret=`rm -f $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/ChangeLog`;
|
||||
#$ret=`rm -f $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/COPYING`;
|
||||
#$ret=`rm -f $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/INSTALL`;
|
||||
@ -503,13 +503,13 @@ if ($nboftargetok) {
|
||||
#$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/zip`;
|
||||
#$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/build/perl`;
|
||||
# We remove embedded libraries or fonts
|
||||
if ($target !~ /GENE/i)
|
||||
{
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/htdocs/includes/artichow/font`,
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/htdocs/includes/barcode/php-barcode/fonts`,
|
||||
}
|
||||
#if ($target !~ /GENE/i)
|
||||
#{
|
||||
# $ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/htdocs/includes/artichow/font`,
|
||||
# $ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/htdocs/includes/barcode/php-barcode/fonts`,
|
||||
#}
|
||||
#$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/htdocs/includes/odtphp/zip/pclzip`;
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/htdocs/includes/odtphp/zip/pclzip/gnu-lgpl.txt`;
|
||||
#$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/usr/share/$PROJECT/htdocs/includes/odtphp/zip/pclzip/gnu-lgpl.txt`;
|
||||
|
||||
# Conf files
|
||||
#print "Copy config files into $BUILDROOT/$FILENAMETGZ2/etc/$PROJECT\n";
|
||||
@ -570,6 +570,9 @@ if ($nboftargetok) {
|
||||
close SPECFROM;
|
||||
close SPECTO;
|
||||
|
||||
print "Copy patch file to $RPMDIR/SOURCES\n";
|
||||
$ret=`cp "$SOURCE/build/rpm/dolibarr-forrpm.patch" "$RPMDIR/SOURCES"`;
|
||||
|
||||
print "Launch RPM build (rpmbuild --clean -ba $BUILDROOT/${BUILDFIC})\n";
|
||||
#$ret=`rpmbuild -vvvv --clean -ba $BUILDROOT/${BUILDFIC}`;
|
||||
$ret=`rpmbuild --clean -ba $BUILDROOT/${BUILDFIC}`;
|
||||
|
||||
42
build/rpm/dolibarr-forrpm.patch
Executable file
42
build/rpm/dolibarr-forrpm.patch
Executable file
@ -0,0 +1,42 @@
|
||||
diff -up htdocs/filefunc.inc.php.patch htdocs/filefunc.inc.php
|
||||
--- htdocs/filefunc.inc.php.patch 2011-09-03 02:32:48.666952000 +0200
|
||||
+++ htdocs/filefunc.inc.php 2011-09-03 02:33:00.510952001 +0200
|
||||
@@ -65,8 +65,8 @@ $conffiletoshowshort = "conf.php";
|
||||
$conffile = "conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
# For debian/redhat like systems
|
||||
-#$conffile = "/etc/dolibarr/conf.php";
|
||||
-#$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
// Include configuration
|
||||
diff -up htdocs/install/inc.php.patch htdocs/install/inc.php
|
||||
--- htdocs/install/inc.php.patch 2011-09-03 02:33:26.450952000 +0200
|
||||
+++ htdocs/install/inc.php 2011-09-03 02:33:36.286952001 +0200
|
||||
@@ -75,8 +75,8 @@ $conffiletoshowshort = "conf.php";
|
||||
$conffile = "../conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
# For debian/redhat like systems
|
||||
-#$conffile = "/etc/dolibarr/conf.php";
|
||||
-#$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
||||
diff -up htdocs/support/inc.php.patch htdocs/support/inc.php
|
||||
--- htdocs/support/inc.php.patch 2011-09-03 02:34:39.606952000 +0200
|
||||
+++ htdocs/support/inc.php 2011-09-03 02:33:59.814952000 +0200
|
||||
@@ -69,8 +69,8 @@ $conffiletoshowshort = "conf.php";
|
||||
$conffile = "../conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
# For debian/redhat like systems
|
||||
-#$conffile = "/etc/dolibarr/conf.php";
|
||||
-#$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
$charset="UTF-8"; // If not output format found in any conf file
|
||||
if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
||||
@ -20,6 +20,7 @@ Vendor: Dolibarr dev team
|
||||
|
||||
URL: http://www.dolibarr.org
|
||||
Source0: http://www.dolibarr.org/files/fedora/%{name}-%{version}.tgz
|
||||
Patch0: %{name}-forrpm.patch
|
||||
BuildArch: noarch
|
||||
#BuildArchitectures: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -67,6 +68,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
#---- prep
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .patch
|
||||
|
||||
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ Vendor: Dolibarr dev team
|
||||
|
||||
URL: http://www.dolibarr.org
|
||||
Source0: http://www.dolibarr.org/files/fedora/%{name}-%{version}.tgz
|
||||
Patch0: %{name}-forrpm.patch
|
||||
BuildArch: noarch
|
||||
#BuildArchitectures: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -68,7 +69,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
#---- prep
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch0 -p0 -b .patch
|
||||
|
||||
|
||||
#---- build
|
||||
|
||||
@ -20,6 +20,7 @@ Vendor: Dolibarr dev team
|
||||
|
||||
URL: http://www.dolibarr.org
|
||||
Source0: http://www.dolibarr.org/files/mandriva/%{name}-%{version}.tgz
|
||||
Patch0: %{name}-forrpm.patch
|
||||
BuildArch: noarch
|
||||
#BuildArchitectures: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -67,6 +68,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
#---- prep
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .patch
|
||||
|
||||
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ Vendor: Dolibarr dev team
|
||||
|
||||
URL: http://www.dolibarr.org
|
||||
Source0: http://www.dolibarr.org/files/opensuse/%{name}-%{version}.tgz
|
||||
Patch0: %{name}-forrpm.patch
|
||||
BuildArch: noarch
|
||||
#BuildArchitectures: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -67,6 +68,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
#---- prep
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .patch
|
||||
|
||||
|
||||
#---- build
|
||||
|
||||
Loading…
Reference in New Issue
Block a user