2
0
forked from Wavyzz/dolibarr

Work on 3.1 packaging

This commit is contained in:
Laurent Destailleur
2011-07-31 13:28:45 +00:00
parent ad581e7465
commit d38942530a
5 changed files with 31 additions and 40 deletions

View File

@@ -14,5 +14,3 @@ version-phpsane.txt
makepack-phpsane.conf
html
*.deb
*.dsc
*.tar.gz

View File

@@ -49,5 +49,5 @@ For first ITP submission of Dolibarr, bug id was 634783.
- Call for a mentor on ML debian-mentors to upload packages
- Once package is uploaded, following URL are available:
http://packages.qa.debian.org/package.html
http://packages.qa.debian.org/package
http://bugs.debian.org/package

View File

@@ -2,7 +2,7 @@
#----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \version $Id: makepack-dolibarr.pl,v 1.126 2011/07/31 17:14:03 eldy Exp $
# \version $Id: makepack-dolibarr.pl,v 1.124 2011/07/31 13:17:03 eldy Exp $
# \author (c)2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
#----------------------------------------------------------------------------
@@ -48,7 +48,7 @@ if (-d "/usr/src/RPM") {
use vars qw/ $REVISION $VERSION /;
$REVISION='$Revision: 1.126 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
$REVISION='$Revision: 1.124 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
$VERSION="1.0 (build $REVISION)";
@@ -274,10 +274,6 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/barcode/php-barcode/fonts/Veranda*.ttf`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/fckeditor/fckeditor.py`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mssql/README`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mysql/README`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/pgsql/README`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/spec`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/licence`;
@@ -414,8 +410,7 @@ if ($nboftargetok) {
}
if ($target eq 'RPM') { # Linux only
#$ARCH='i386';
$ARCH='noarch';
$ARCH='i386';
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/0/gi; # dev
@@ -440,7 +435,6 @@ if ($nboftargetok) {
print "Remove other files\n";
$ret=`rm -f $BUILDROOT/$FILENAMETGZ2/htdocs/includes/barcode/php-barcode/genbarcode/genbarcode`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/README`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/aps`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/deb`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/dmg`;
@@ -478,10 +472,6 @@ if ($nboftargetok) {
print "Move $RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm into $DESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\n";
$cmd="mv \"$RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\" \"$DESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\"";
$ret=`$cmd`;
print "Move $RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm into $DESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\n";
$cmd="mv \"$RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\" \"$DESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\"";
$ret=`$cmd`;
next;
}
@@ -685,7 +675,7 @@ if ($nboftargetok) {
$ret=`cp -f "$SOURCE/build/deb/compat" "$BUILDROOT/$PROJECT.tmp/debian/compat"`;
$ret=`cp -f "$SOURCE/build/deb/format" "$BUILDROOT/$PROJECT.tmp/debian/source/format"`;
$ret=`cp -fr "$SOURCE/build/deb/po" "$BUILDROOT/$PROJECT.tmp/debian/po"`;
$ret=`rm -fr "$BUILDROOT/$PROJECT.tmp/debian/po/CVS"`;
$ret=`rm -fr "$SOURCE/build/deb/po/CVS"`;
# Add files also required to build binary package with dpkg-buildpackages
$ret=`cp -f "$SOURCE/build/deb/config" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/deb/postinst" "$BUILDROOT/$PROJECT.tmp/debian"`;
@@ -707,14 +697,11 @@ if ($nboftargetok) {
{
print "Move *_all.deb to $DESTI\n";
$ret=`mv $BUILDROOT/*_all.deb "$DESTI/"`;
$ret=`mv $BUILDROOT/*.dsc "$DESTI/"`;
$ret=`mv $BUILDROOT/*.tar.gz "$DESTI/"`;
}
else
{
print "Move *_all.deb to $DESTI\n";
$ret=`mv $BUILDROOT/*.dsc "$DESTI/"`;
$ret=`mv $BUILDROOT/*.tar.gz "$DESTI/"`;
$ret=`mv $BUILDROOT/*_all.deb "$DESTI/"`;
}
next;
}

View File

@@ -5,15 +5,24 @@ RPM Package tools
This directory contains files used by makepack-dolibarr.pl
script to build a package, ready to be distributed,
with format RPM (for Redhat, Mandriva, ...).
with format RPM (for Redhat, OpenSuse, Mandriva, ...).
# This is standard command to work on Debian packaging:
# This is standard command to work on RPM packaging:
#
# yum -y install rpmlint
# yum -y install hunspell-en hunspell-es hunspell-fr hunspell-it
#
# rpmlint file.rpm Test a package
# mock -r fedora-15-i386 --rebuild ../SRPMS/hello-2.7-1.fc15.src.rpm
#
# On Fedora
# rpm -i --test dolibarr-...rpm To list dependencies of RPM
# yum install dolibarr-...rpm To install package and dependencies
# yum erase dolibarr To remove package
# yum erase dolibarr To remove package
# chcon -R -h -t httpd_sys_script_rw_t /file To add temporary context rw for httpd on /file
# semanage fcontext -a -t httpd_sys_script_rw_t "/dir/(.*)?" To add persistent context rw for httpd on /dir (this add file_contexts.local)
# restorecon -R -v /file Restore values into files (cancel chcon, validate semanage)
#
# On OpenSuse
# yast --install dolibarr-...rpm To install package and dependencies
@@ -27,18 +36,22 @@ with format RPM (for Redhat, Mandriva, ...).
To submit a package to Fedora:
- Create account on bugzilla.redhat.com
- Create account on fedoraproject.org
- Create SRPMS package.
- Upload package onf http://fedorapeople.org
- Create a bug with form https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review
This is example of content of review field (used for Bug 723326):
Spec URL: http://www.dolibarr.org/files/fedora/dolibarr.spec
SRPM URL: http://www.dolibarr.org/files/fedora/dolibarr-3.1.0-0.src.rpm
SRPMS URL: http://www.dolibarr.org/files/fedora/dolibarr-x.y.z-xxx.src.rpm
Description: Dolibarr ERP & CRM is an easy to use open source/free software
for small and medium companies, foundations or freelances. It includes
different features for Enterprise Resource Planning (ERP) and Customer
Relationship Management (CRM) but also for different other activities.
I am author of other already packaged OpenSources packages (awstats) but this
is my first package to maintain myself. So i'm seeking a sponsor.
- Edit field "Block" and add FE-NEEDSPONSOR
- Check bug is into database by searching with id on https://bugzilla.redhat.com/
- Check bug is into database by searching with id on https://bugzilla.redhat.com/
- Install fedora packager tools: yum install fedora-packager
- Setup fedora packagers tools: fedora-packager-setup
- Send your package: koji build --scratch f16 path_to_source_RPM
- Check if package is available: http://koji.fedoraproject.org/koji/

View File

@@ -20,7 +20,7 @@ Vendor: Dolibarr dev team
URL: http://www.%{name}.org
Source: /usr/src/RPM/SOURCES/%{name}-%{version}.tgz
BuildArch: noarch
#BuildArch: noarch
#BuildArchitectures: noarch
BuildRoot: /tmp/%{name}-buildroot
#Icon: dolibarr_logo1.gif
@@ -345,19 +345,12 @@ then
fi
# Removed dirs after apache restart
echo Removed remaining $apacheconfig
echo Removed remaining dirs
rm -f $apacheconfig
echo Removed remaining $config
rm -f $config
echo Removed remaining $installconfig
rm -f $installconfig
echo Removed remaining $lockfile
rm -f $lockfile
echo Removed remaining dir $targetdir/doc
rmdir $targetdir/doc >/dev/null 2>&1
#echo Removed remaining dir $targetdir/htdocs
#rmdir $targetdir/htdocs >/dev/null 2>&1 # Already removed by rpm
rmdir $targetdir/htdocs >/dev/null 2>&1
%changelog
* Wed Jul 31 2011 Laurent Destailleur 3.1.0
- Initial upstream (#723326)