You are not logged in.
Pages: 1
******************************************
Please see post #6 for review request
******************************************
-->This is easier to understand if you know SciTE. <--
I put together a PKGBUILD file for SciTE from CVS. I got it working great but with one remaining problem. There are bugs (that I filed a bug report for) where some of the options in the User Options File are ignored by SciTE. Two of these that I know of are window position and geometry. In order to change these settings it has to be done to the Global Options File. This is overwritten every time SciTE is updated.
The solution so far is to check to see if /usr/share/scite/SciTEGlobal.properties already exists in the file system. If it does, the new version of the file is saved as SciTEGlobal.properties.pacnew and the old version is copied into the new package. Is this a decent solution until the bug gets fixed upstream? If so, how do I get pacman to print and log the information? If not, would copying all of the settings from the old properties file to the new one make more sense?
--EDIT--
Post #6 has the (hopefully) final version.
Last edited by skottish (2008-09-30 06:17:35)
Offline
I suppose, this should be done not in PKGBUILD's build section but in post_install section in .install file. So, you should always install SciTEGlobal.properties.pacnew and then (in post_install) rename it to SciTEGlobal.properties if the later does not already exist.
Offline
I suppose, this should be done not in PKGBUILD's build section but in post_install section in .install file. So, you should always install SciTEGlobal.properties.pacnew and then (in post_install) rename it to SciTEGlobal.properties if the later does not already exist.
The .install file! Of course! Those things exists for a reason after all. Thanks Mr.Cat.
Welcome to the forums by the way.
Offline
Welcome to the forums by the way.
Thnx.
Offline
I was tired when I wrote the .pacnew stuff. The window position code is useless under Linux. If you can use GTK, you're within a WM. And, it seems that the geometry stuff is already fixed. It's been broken for so long that I didn't notice it wasn't anymore. I'll comment out the position stuff by default.
Offline
All of my questions are now answered and no one has commented, so soon to be in AUR.
# Maintainer: skottish <STUFF>
# Contributor: Corrado 'bardo' Primier <STUFF>
# Contributor: Jochem Kossen <STUFF>
pkgname=scite-cvs
pkgver=20080929
pkgrel=1
pkgdesc="A generally useful editor with facilities for building and running programs"
arch=('i686' 'x86_64')
url="http://www.scintilla.org/SciTE.html"
license=('custom:scite')
depends=('gtk2' 'desktop-file-utils')
provides=('scite')
conflicts=('scite')
makedepends=('cvs')
install=scite.install
source=(SciTE.desktop)
md5sums=('48526532ef677982a4b156ae90f25b6f')
_builddir="scite-build"
_cvsroot=":pserver:anonymous@scintilla.cvs.sourceforge.net:/cvsroot/scintilla"
_cvsmod="scintilla"
_cvsmod_scite="scite"
build() {
mkdir $startdir/src/$_builddir
cd $startdir/src/
msg "Connecting to scintilla.cvs.sourceforge.net CVS server....[Scintilla]"
if [ -d $_cvsmod ]; then
cd $_cvsmod
cvs -z3 update -d
else
cvs -z3 -d $_cvsroot co -D $pkgver -f $_cvsmod
fi
cd $startdir/src/
msg "Connecting to scintilla.cvs.sourceforge.net CVS server....[SciTE]"
if [ -d $_cvsmod_scite ]; then
cd $_cvsmod_scite
cvs -z3 update -d
else
cvs -z3 -d $_cvsroot co -D $pkgver -f $_cvsmod_scite
fi
msg "CVS checkout done or server timeout"
msg "Starting make..."
cd $startdir/src/
cp -r $_cvsmod $_builddir
cp -r $_cvsmod_scite $_builddir
find $_builddir -type f -exec sed -i 's/1.76/CVS/' {} \;
cd $_builddir/$_cvsmod/gtk
sed -i "s/#ARCHCXXFLAGS#/${CXXFLAGS}/g" makefile
make || return 1
install -Dm644 ../License.txt $startdir/pkg/usr/share/licenses/scintilla/LICENSE
cd $startdir/src/$_builddir/$_cvsmod_scite/gtk
sed -i "s/#ARCHCXXFLAGS#/${CXXFLAGS}/g" makefile
make || return 1
make DESTDIR=$startdir/pkg install
install -Dm644 ../License.txt $startdir/pkg/usr/share/licenses/${pkgname}/LICENSE
install -Dm644 $startdir/src/SciTE.desktop $startdir/pkg/usr/share/applications/
ln -sf SciTE $startdir/pkg/usr/bin/scite
cd $startdir/pkg/usr/share/scite/
find SciTEGlobal.properties -type f -exec sed -i 's/position.left/#position.left/' {} \;
find SciTEGlobal.properties -type f -exec sed -i 's/position.top/#position.top/' {} \;
rm -rf $startdir/src/$_builddir
}
# vim:set ts=2 sw=2 et:
Last edited by skottish (2008-09-30 06:24:05)
Offline
How come ScitE is no longer listed in pacman?
pacman -Ss scite
"The ecological crisis is a moral issue."
Offline
$ /usr/bin/pacman -Ss scite
community/scite 1.77-1 [0,90 MB]
A generally useful editor with facilities for building and running programs
1000
Offline
B15HOP, do you have the [community] repo enabled in yout pacman.conf?
Offline
oops had a # in front of community
"The ecological crisis is a moral issue."
Offline
Pages: 1