moved into main repo for pisi 2.0

This commit is contained in:
ayhanyalcinsoy
2015-06-19 13:39:29 +03:00
parent 2450ac02c1
commit fae70ecd20
25 changed files with 1273 additions and 0 deletions
+85
View File
@@ -0,0 +1,85 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
import os
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
WorkDir="Firebird-%s-0" % get.srcVERSION()
def setup():
pisitools.dosed("src/isql/isql.epp", '"isql\s', '"fbsql ')
pisitools.dosed("src/msgs/history2.sql", 'isql\s', 'fbsql ')
pisitools.dosed("src/msgs/messages2.sql", 'isql\s', 'fbsql ')
pisitools.dosed("src/msgs/messages2.sql", 'ISQL\s', 'FBSQL ')
shelltools.system("find ./ -name \*.sh -print0 | xargs -0 chmod +x")
for d in ("btyacc", "editline", "icu"):
shelltools.unlinkDir("extern/%s" % d)
autotools.autoreconf("-fi")
autotools.configure("--prefix=/opt/firebird \
--disable-static \
--enable-superserver \
--with-editline \
--with-gnu-ld \
--with-system-editline \
--with-system-icu \
")
def build():
#Parallel build is broken
autotools.make("-j1")
shelltools.cd("gen")
pisitools.dosed("install/makeInstallImage.sh", "exit 1", "# exit 1")
pisitools.dosed("install/makeInstallImage.sh", "chown", 'echo ""# chown')
pisitools.dosed("install/makeInstallImage.sh", "chmod", 'echo ""# chmod')
autotools.make("-f Makefile.install buildRoot")
def install():
# Copy to install directory
shelltools.copytree("gen/buildroot/", get.installDIR())
# Move headers
pisitools.remove("/usr/include/*")
pisitools.domove("/opt/firebird/include", "/usr/include", "firebird")
# Fix client libraries symlinks
pisitools.removeDir("/usr/lib*")
for libs in os.listdir("%s/opt/firebird/lib" % get.installDIR()):
pisitools.dosym("/opt/firebird/lib/%s" % libs, "/usr/lib/%s" % libs)
pisitools.dosym("/opt/firebird/plugins/libfbtrace.so", "/usr/lib/libfbtrace.so")
# Add support for old client's
pisitools.dosym("libfbclient.so", "/usr/lib/libgds.so")
pisitools.dosym("libfbclient.so", "/usr/lib/libgds.so.0")
pisitools.dosym("libfbclient.so", "/opt/firebird/lib/libgds.so")
pisitools.dosym("libfbclient.so", "/opt/firebird/lib/libgds.so.0")
# Move configuration files and security DB to /etc/firebird for painless upgrade
pisitools.domove("/opt/firebird/aliases.conf", "/etc/firebird")
pisitools.domove("/opt/firebird/firebird.conf", "/etc/firebird")
pisitools.domove("/opt/firebird/security2.fdb", "/etc/firebird")
pisitools.dosym("/etc/firebird/aliases.conf", "/opt/firebird/aliases.conf")
pisitools.dosym("/etc/firebird/firebird.conf", "/opt/firebird/firebird.conf")
pisitools.dosym("/etc/firebird/security2.fdb", "/opt/firebird/security2.fdb")
# Set PID directory
shelltools.makedirs("%s/run/firebird" % get.installDIR())
#pisitools.dodir("/opt/firebird/run")
# Set permissions
shelltools.chmod("%s/etc/firebird/security2.fdb" % get.installDIR(), 0600)
shelltools.chmod("%s/run/firebird" % get.installDIR(), 0755)
#shelltools.chmod("%s/opt/firebird/run" % get.installDIR(), 0755)
pisitools.dosym("/var/log/firebird.log", "/opt/firebird/firebird.log")
# Useless init.d stuff
pisitools.removeDir("/opt/firebird/misc/")
# Prevent to conflict isql with UnixODBC's
pisitools.domove("/opt/firebird/bin/isql", "/opt/firebird/bin", "fb_isql")
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os, pwd, socket
pid_dir = "/run/firebird"
log_file = "/var/log/firebird.log"
uid = pwd.getpwnam("firebird")[2]
hostname = socket.gethostname()
def touch(filename):
try:
f = open(filename, "w")
f.close()
except IOError:
fail("Failed to create %s file" % filename)
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
# # Configure PID directory
os.chown(pid_dir, uid, -1)
# Create log file
touch(log_file)
os.chown(log_file, uid, -1)
os.chmod(log_file, 0644)
# Configure security2.fdb file
os.chown("/opt/firebird/security2.fdb", uid, -1)
# Create lock files
for lock_filename in ("isc_guard1", "isc_init1", "isc_lock1"):
lock_filename = "/opt/firebird/%s.%s" % (lock_filename, hostname)
touch(lock_filename)
os.chown(lock_filename, uid, -1)
os.chmod(lock_filename, 0644)
def preRemove():
# Remove lock files
for lock_filename in ("isc_guard1", "isc_init1", "isc_lock1"):
lock_filename = "/opt/firebird/%s.%s" % (lock_filename, hostname)
if os.path.exists(lock_filename):
os.remove(lock_filename)
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
serviceType="server"
serviceDesc = _({"en": "Firebird Database Server",
"tr": "Firebird Veritabanı Sunucusu"})
from comar.service import *
pid_file = "/run/firebird/firebird.pid"
@synchronized
def start():
startService(command="/opt/firebird/bin/fbguard",
args="-pidfile %s -start -forever -daemon" % pid_file,
pidfile="/run/firebird/firebird.pid",
donotify=True)
# chuid="firebird",
@synchronized
def stop():
stopService(pidfile=pid_file,
donotify=True)
def status():
return isServiceRunning(pid_file)
@@ -0,0 +1 @@
ROOTPATH="/opt/firebird/bin"
@@ -0,0 +1,12 @@
diff -Nuar Firebird-2.1.0.17798-0.orig/extern/editline/src/makelist Firebird-2.1.0.17798-0/extern/editline/src/makelist
--- Firebird-2.1.0.17798-0.orig/extern/editline/src/makelist 2007-04-09 15:57:41.000000000 +0300
+++ Firebird-2.1.0.17798-0/extern/editline/src/makelist 2008-07-12 14:02:29.000000000 +0300
@@ -140,7 +140,7 @@
#
-fh)
cat $FILES | $AWK '/el_action_t/ { print $3 }' | \
- sort | tr '[:lower:]' '[:upper:]' | $AWK '
+ sort | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | $AWK '
BEGIN {
printf("/* Automatically generated file, do not edit */\n");
printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n");
@@ -0,0 +1,59 @@
diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/Makefile.in.firebird Firebird-2.5.0.26074-0_deps-flags/builds/posix/Makefile.in.firebird
--- Firebird-2.5.0.26074-0_orig/builds/posix/Makefile.in.firebird 2010-11-09 12:42:45.000000000 -0500
+++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/Makefile.in.firebird 2011-03-28 15:10:09.814370706 -0400
@@ -158,7 +158,7 @@
# some complications particularly for super in needing to start the server
# that you are currently building. MOD 28-July-2002
-firebird_basic: btyacc_binary external_libraries firebird_boot basic_targets
+firebird_basic: firebird_boot basic_targets
firebird_boot: updateBuildNum boot_phase1 boot_phase2
diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/make.defaults Firebird-2.5.0.26074-0_deps-flags/builds/posix/make.defaults
--- Firebird-2.5.0.26074-0_orig/builds/posix/make.defaults 2010-11-09 12:42:45.000000000 -0500
+++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/make.defaults 2011-03-28 15:21:26.904370708 -0400
@@ -138,7 +138,7 @@
AR= ar @AR_OPTIONS@ crsu
LN= @LN_S@
RANLIB= @RANLIB@
-BTYACC=$(ROOT)/extern/btyacc/btyacc
+BTYACC=/usr/bin/btyacc
CC = @CC@
CXX = @CXX@
diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux
--- Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux 2010-11-09 12:42:45.000000000 -0500
+++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux 2011-03-25 21:38:29.031037374 -0400
@@ -18,11 +18,10 @@
#
# 2 Oct 2002, Nickolay Samofatov - Major cleanup
-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -pipe -MMD -fPIC -fmessage-length=0
-OPTIMIZE_FLAGS=-O3 -march=i586 -mtune=i686 -fno-omit-frame-pointer
+COMMON_FLAGS=-DLINUX -MMD -fPIC -fmessage-length=0
WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable
-PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS)
+PROD_FLAGS=$(COMMON_FLAGS)
#DEV_FLAGS=-DUSE_VALGRIND -p $(COMMON_FLAGS) $(WARN_FLAGS)
DEV_FLAGS=-p $(COMMON_FLAGS) $(WARN_FLAGS)
diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux_amd64 Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux_amd64
--- Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux_amd64 2010-11-09 12:42:45.000000000 -0500
+++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux_amd64 2011-03-25 21:39:15.134370707 -0400
@@ -18,12 +18,11 @@
#
# 2 Oct 2002, Nickolay Samofatov - Major cleanup
-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0
-OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer
+COMMON_FLAGS=-DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -MMD -fPIC -fmessage-length=0
WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable
CXXFLAGS:= $(CXXFLAGS) -fno-rtti
-PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS)
+PROD_FLAGS=$(COMMON_FLAGS)
#DEV_FLAGS=-DUSE_VALGRIND $(COMMON_FLAGS) $(WARN_FLAGS)
DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
@@ -0,0 +1,13 @@
Index: Firebird-2.1.3.18185-0/configure.in
===================================================================
--- Firebird-2.1.3.18185-0.orig/configure.in
+++ Firebird-2.1.3.18185-0/configure.in
@@ -142,7 +142,7 @@ dnl CPU_TYPE=ppc64
LOCK_MANAGER_FLG=Y
EDITLINE_FLG=Y
SHRLIB_EXT=so
- libdir=/usr/lib64
+ libdir=/usr/lib
CPU_TYPE=amd64
RPM64='()(64bit)'
;;
@@ -0,0 +1,3 @@
# Insert host names here to allow connect to Firebird
localhost.localdomain
localhost
+130
View File
@@ -0,0 +1,130 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>firebird</Name>
<Homepage>http://www.firebirdsql.org/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>IPL-1</License>
<License>IDPL-1</License>
<License>LGPLv2.1</License>
<IsA>service</IsA>
<IsA>library</IsA>
<Summary>A relational database offering many ANSI SQL-99 features</Summary>
<Description>Firebird is an open source relational database management system offering many ANSI SQL-99 features.</Description>
<Archive sha1sum="1b91d3b01d27ea420d21daa025ded3dffa9b297a" type="tarbz2">http://sourceforge.net/projects/firebird/files/firebird/2.5.2-Release/Firebird-2.5.2.26540-0.tar.bz2/download</Archive>
<BuildDependencies>
<Dependency>icu4c-devel</Dependency>
<Dependency>btyacc</Dependency>
<Dependency>libedit-devel</Dependency>
</BuildDependencies>
<Patches>
<!--Patch>hosts_equiv.patch</Patch>
<Patch>firebird-gcc-icu.patch</Patch>
<Patch>firebird-mcpu-to-mtune.patch</Patch>
<Patch level="1">fix-lib64-dir.diff</Patch>
<Patch level="1">firebird-2.5.1-svn-CORE-3610.patch</Patch>-->
<Patch level="1">editline-dumb-tr.patch</Patch>
<Patch level="1">firebird-2.5.1.26351.0-deps-flags.patch</Patch>
</Patches>
</Source>
<Package>
<Name>firebird-client</Name>
<Summary>Firebird database client library</Summary>
<Description>Firebird relational database client library.</Description>
<Files>
<Path fileType="library">/usr/lib/libfbclient.*</Path>
<Path fileType="library">/usr/lib/libgds.*</Path>
<Path fileType="library">/usr/lib/libib_util.*</Path>
<Path fileType="library">/usr/lib/libfbtrace.so</Path>
<Path fileType="library">/opt/firebird/lib/libfbclient.*</Path>
<Path fileType="library">/opt/firebird/lib/libgds.*</Path>
<Path fileType="library">/opt/firebird/lib/libib_util.*</Path>
<Path fileType="library">/opt/firebird/plugins/libfbtrace.so</Path>
</Files>
</Package>
<Package>
<Name>firebird-superserver</Name>
<Summary>Firebird super server</Summary>
<RuntimeDependencies>
<Dependency>firebird-client</Dependency>
<Dependency>icu4c</Dependency>
<Dependency>libedit</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="config">/etc/firebird</Path>
<Path fileType="config">/etc/env.d/50firebird</Path>
<Path fileType="config">/opt/firebird/*.conf</Path>
<Path fileType="localedata">/opt/firebird/*.msg</Path>
<Path fileType="data">/opt/firebird/security2.fdb</Path>
<Path fileType="doc">/opt/firebird/README</Path>
<Path fileType="doc">/opt/firebird/WhatsNew</Path>
<Path fileType="library">/opt/firebird/UDF</Path>
<Path fileType="executable">/opt/firebird/bin</Path>
<Path fileType="doc">/opt/firebird/doc</Path>
<Path fileType="doc">/opt/firebird/examples</Path>
<Path fileType="data">/opt/firebird/help</Path>
<Path fileType="data">/opt/firebird/intl</Path>
<Path fileType="library">/opt/firebird/lib/libicu*</Path>
<Path fileType="doc">/opt/firebird/upgrade</Path>
<Path fileType="data">/opt/firebird/firebird.log</Path>
<Path fileType="data">/opt/firebird</Path>
<Path fileType="data">/run/firebird</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/etc/firebird/hosts.equiv">hosts.equiv</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/env.d/50firebird">50firebird</AdditionalFile>
</AdditionalFiles>
<Provides>
<COMAR script="service.py">System.Service</COMAR>
<COMAR script="package.py">System.Package</COMAR>
</Provides>
</Package>
<Package>
<Name>firebird-devel</Name>
<Summary>Development files for firebird</Summary>
<RuntimeDependencies>
<Dependency release="current">firebird-client</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include/firebird</Path>
</Files>
</Package>
<History>
<Update release="4">
<Date>2014-05-19</Date>
<Version>2.5.2.26540</Version>
<Comment>Version bump.</Comment>
<Name>Alihan Öztürk</Name>
<Email>alihan@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2013-10-14</Date>
<Version>2.5.2.26539</Version>
<Comment>Rebuild for icu4c</Comment>
<Name>Ertan Güven</Name>
<Email>ertan@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-03-20</Date>
<Version>2.5.2.26539</Version>
<Comment>Version bump</Comment>
<Name>Ertan Güven</Name>
<Email>ertan@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2012-10-15</Date>
<Version>2.5.1.26351</Version>
<Comment>First release</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
</History>
</PISI>
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>firebird</Name>
<Summary xml:lang="tr">Birçok ANSI SQL-99 özelliği sunan ilişkisel bir veritabanı</Summary>
<Description xml:lang="tr">Birçok ANSI SQL-99 özelliği sunan, küçük, hızlı ve çok kararlı bir veritabanı sunucu.</Description>
</Source>
<Package>
<Name>firebird-client</Name>
<Summary xml:lang="tr">Firebird veritabanı istemci kütüphanesi</Summary>
<Description xml:lang="tr">Firebird sunucuya bağlantı için kullanılan istemci kütüphanesi</Description>
</Package>
<Package>
<Name>firebird-superserver</Name>
<Summary xml:lang="tr">Firebird veritabanı sunucusu</Summary>
<Description xml:lang="tr">Firebird veritabanı için super sunucu. Klasik sunucu mimarisine göre, SMP performansı daha fazladır.</Description>
</Package>
<Package>
<Name>firebird-devel</Name>
<Summary xml:lang="tr">Firebird için geliştirme dosyaları</Summary>
</Package>
</PISI>