--- bgoffice-computer-terms-0.0.200802171847.orig/debian/rules +++ bgoffice-computer-terms-0.0.200802171847/debian/rules @@ -0,0 +1,45 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +PKG = $(word 1, $(shell dh_listpackages)) + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + odt2txt --encoding=UTF-8 en-bg-comp-dict.odt \ + | perl debian/odttxt2dat.pl > computer-terms.dat + + touch $@ + +clean: + dh $@ + + dh_clean computer-terms.dat + +install: build + dh $@ + +# Build architecture-independent files here. +binary-indep: build install + dh $@ + +# Build architecture-dependent files here. +binary-arch: build install +# Architecture: all package. nothing to do here + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install + +.PHONY: get-orig-source +get-orig-source: + sh debian/get-orig-source.sh --- bgoffice-computer-terms-0.0.200802171847.orig/debian/odttxt2dat.pl +++ bgoffice-computer-terms-0.0.200802171847/debian/odttxt2dat.pl @@ -0,0 +1,173 @@ +#!/usr/bin/perl -w + +use strict; +use utf8; +use Encode; + +my $opt_text = (@ARGV and $ARGV[0] eq '-t'); +shift @ARGV if $opt_text; + +binmode(STDIN, ':utf8'); +use POSIX qw(LC_CTYPE setlocale); +#binmode(STDOUT, ':utf8'); + +my $locale = 'bg_BG.UTF-8'; + +setlocale(LC_CTYPE, $locale); + +setlocale(LC_CTYPE) eq $locale + or die "Unable to set locale to $locale"; + +use locale; + +my $state = 'start'; +my $entry = ''; + +my %dict; + +sub output_entry() +{ + my $word; + $entry =~ s/\.$//; + + if( $entry =~ s/^([^а-я]+)\s(n|adj|v|abbr|attr)\s(?=\d+\.)/($2)\n/i ) + { + $word = $1; + + $entry =~ s/~/$word/g; + } + elsif( $entry =~ s/^([^а-я]+)\s(n|adj|v|abbr|attr)\s/($2)\n/i ) + { + $word = $1; + + $entry =~ s/~/$word/g; + } + elsif( $entry =~ s/([^а-я]+)\s(?=[а-я])//i ) + { + $word = $1; + + $entry =~ s/~/$word/g; + } + elsif( $entry =~ s/^(.+) = (?=.+$)/вж. / ) + { + $word = $1; + } + else + { + die "Can't parse the word out of entry: $entry"; + } + + $entry =~ s/;\s(?=\d+\.\s+)/\n/g; + $entry =~ s/;\s(n|adj|v|abbr|attr)\s+(?=\d+\.)/\n($1)\n/g; + $entry =~ s/;\s(n|adj|v|abbr|attr)(?=\s+)/\n($1)/g; + #$entry =~ s/(?<=\s)1\.(?=\s)//; + + if( $word !~ /^\d/ ) + { + my $key = lc($word); + $key =~ s/\W+//g; + + $dict{$key} = "$word\n$entry"; + } + + $entry = ''; +} + +sub process(@) +{ + my($prev, $curr, $next) = @_; + + while(1) + { + #warn $curr, '--', $state, '--', $next; + if( $state eq 'start' ) + { + if( $curr =~ /^------$/ and $prev =~ /^Речник$/ ) + { + $state = 'wait-dict-data'; + } + last; + } + + if( $state eq 'wait-dict-data' ) + { + last if( $curr eq '' ); + + # new letter index + last if $next eq '=' x length($curr); + last if $curr eq '=' x length($prev); + + # there are letter indices without the "=" underline + last if $curr =~ /^[A-Z]$/ and ($next =~ /=/ or $next eq ''); + + # Започва с текст на латиница и съдържа кирилица + if( $next !~ /^=+$/ and $curr =~ /^[a-z0-9]/i and $curr =~ /[a-я]/i ) + { + $state = 'dict-data'; + $entry = $curr; + last; + } + + die "Unrecognized data: '$curr'"; + } + + if( $state eq 'dict-data' ) + { + if( $curr eq '' ) + { + output_entry(); + $state = 'wait-dict-data'; + } + else + { + $entry .= ' ' . $curr; + } + + last; + } + }; +} + +my @window = ('', '', ''); +while(<>) +{ + chomp; + s/^\s+//; + + s/sеrvlet/servlet/g; # First `e' is in cyrillics + + shift @window; + push @window, $_; + + process(@window); +} + +my @tmp = @window; +while( @window ) +{ + shift @tmp; + shift @window; + push @tmp, ''; + + process(@tmp); +} + +foreach(sort( keys %dict ) ) +{ + my $out = $dict{$_}; + + print "\000" unless $opt_text; + + while( $out ne '' ) + { + my $encoded_out = Encode::encode('cp1251', $out, Encode::FB_QUIET); + + print $encoded_out; + + $out =~ s/^./?/; + } + + print "\n\n" if $opt_text; +} + +print "\000" unless $opt_text; --- bgoffice-computer-terms-0.0.200802171847.orig/debian/get-orig-source.sh +++ bgoffice-computer-terms-0.0.200802171847/debian/get-orig-source.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +set -e # fail on errors +set -u # fail on usage of unbound variables + +PKG="bgoffice-computer-terms" +ODT="en-bg-comp-dict.odt" +SITE="http://m-balabanov.hit.bg" + +TMP=`mktemp -d` + +trap "rm -rf $TMP" EXIT QUIT TERM + +wget -O "$TMP/$ODT" "$SITE/$ODT" + +STAMP=`odt2txt "$TMP/$ODT" \ + | grep "Последно обновяване" \ + | sed -e 's/^ \+Последно обновяване: \([0-9]\+\).\([0-9]\+\).\([0-9]\+\) г., \([0-9]\+\):\([0-9]\+\) ч./\3 \2 \1 \4 \5/'` + +YR=`echo "$STAMP" | cut -f1 -d" "` +MO=`echo "$STAMP" | cut -f2 -d" "` +DA=`echo "$STAMP" | cut -f3 -d" "` +HR=`echo "$STAMP" | cut -f4 -d" "` +MI=`echo "$STAMP" | cut -f5 -d" "` + +if [ -z "$YR" ] || [ -z "$MO" ] || [ -z "$DA" ] || [ -z "$HR" ] || [ -z "$MI" ]; +then + echo "Unable to parse last change timestamp ($STAMP)" + exit 1 +fi + +STAMP=`printf "%d%02d%02d%02d%02d" "$YR" "$MO" "$DA" "$HR" "$MI"` + +if ! echo "$STAMP" | egrep -q '^[0-9]+$'; then + echo "Invalid version stamp [$STAMP]" + exit 1 +fi + +VER="0.0.$STAMP" + +mkdir "$TMP/$PKG-$VER.orig" +mv "$TMP/$ODT" "$TMP/$PKG-$VER.orig/" + +tar czf "../${PKG}_$VER.orig.tar.gz" -C "$TMP" "$PKG-$VER.orig" +mv "$TMP/$PKG-$VER.orig/$ODT" . + +echo "../${PKG}_$VER.orig.tar.gz ready" --- bgoffice-computer-terms-0.0.200802171847.orig/debian/changelog +++ bgoffice-computer-terms-0.0.200802171847/debian/changelog @@ -0,0 +1,93 @@ +bgoffice-computer-terms (0.0.200802171847-2ubuntu1) jaunty; urgency=low + + * debian/control: changed build dependency on locales-all to + language-pack-bg-base (LP: #337549) + + -- Fabrice Coutadeur Wed, 04 Mar 2009 01:58:50 +0000 + +bgoffice-computer-terms (0.0.200802171847-2) unstable; urgency=low + + * drop transitional bedic-computer-terms + * Standards-Version: 3.8.0 (no changes) + * trim down debian/rules using debhelper 7 + + -- Damyan Ivanov Thu, 24 Jul 2008 00:30:24 +0300 + +bgoffice-computer-terms (0.0.200802171847-1) unstable; urgency=low + + * New upstream release from 2008.02.17 + + * rename back to bgoffice-computer-terms to match upstream. no forks. + * fix debian/odttxt2dat.pl to handle letter headings without '=' underline + * debian/control: + + promote X-Vcs-Svn to a real field (and move it to bgoffice-...) + + add Vcs-Browser field + + add transitional bedic-computer-terms package, depending on + bgoffice-computer-terms + + debian/control: fix long description to not refer to non-existing gbedic + * Standards-Version: 3.7.3 (no changes) + * debian/copyright: update copyright years + + packaging is GPL-2-only + * move debian/dirs' content to debian/rules (only one dir) + + -- Damyan Ivanov Wed, 05 Mar 2008 14:45:48 +0200 + +bedic-computer-terms (0.0.200706020238-1) unstable; urgency=low + + * New upstream "release" + * Now uses the proper GFDL boilerplate. Update debian/copyright accordingly + + * Fixed Vcs header in debian/control + * s/gbgoffice/gbedic/ in Recommends + * Make the package auto-buildable + + Make debian/odttxt2dat.pl set its locale and check if it is OK. + Add 'use locale;' + + Add locales-all to Build-Depends-Indep + + Add --encoding=UTF-8 to odt2text invocation + + -- Damyan Ivanov Tue, 05 Jun 2007 16:00:35 +0300 + +bedic-computer-terms (0.0.200705170102-1) unstable; urgency=low + + * Reworked, based on sane build process. No longer strange binaries. + * Changed upstream version to a timestamp, extracted from last change date + of the document + * Replace debian/copyright with one that actually makes sense + * Reworked delivery of upstream tarball in separate + debian/get-orig-source.sh + * Added odt2txt to Build-Depends + * Moved packaging to binary-indep; binary-dep is a dummy + * Rename to match reality + + update debian/get-orig-source.sh, debian/dirs and debian/rules + accordingly + + [ Yavor Doganov ] + * Moved odt2txt to Build-Depends-Indep. + * debian/get-orig-source.sh: Guard the PKG variable with braces. + * debian/rules: Removed the configure target, it is useless. + * debian/patches/001_data-dir.patch: Removed, not necessary anymore. + + -- Damyan Ivanov Tue, 29 May 2007 13:44:35 +0300 + +bgoffice-computer-terms (1.0-2) unstable; urgency=low + + [ George Danchev ] + * Added myself to Uploaders + * Added get-orig-osurce target + * Moved debhelper to Build-Depends + * Dropped cdbs, debhelper is enough + * Debhelper compat level 5; no changes needed + * Standards-Version 3.7.2; no changes needed + * Updated copyright file + + [ Damyan ivanov ] + * Dropped Provides: bgoffice-data + + -- Damyan Ivanov Tue, 24 Oct 2006 15:25:40 +0300 + +bgoffice-computer-terms (1.0-1) unstable; urgency=low + + * Initial Release. + + -- Damyan Ivanov Tue, 18 Jan 2005 15:29:30 +0200 + --- bgoffice-computer-terms-0.0.200802171847.orig/debian/control +++ bgoffice-computer-terms-0.0.200802171847/debian/control @@ -0,0 +1,21 @@ +Source: bgoffice-computer-terms +Section: text +Priority: extra +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Debian Add-ons Bulgaria Project +Uploaders: Damyan Ivanov +Build-Depends: debhelper (>= 7) +Build-Depends-Indep: odt2txt, perl, language-pack-bg-base +Standards-Version: 3.8.0 +Vcs-Svn: http://svn.openfmi.net/debian-addons-bg/bgoffice-computer-terms +Vcs-Browser: http://openfmi.net/plugins/scmsvn/cgi-bin/viewcvs.cgi/bgoffice-computer-terms/?root=debian-addons-bg + +Package: bgoffice-computer-terms +Architecture: all +Depends: ${misc:Depends} +Recommends: gbgoffice +Description: English-Bulgarian dictionary of computer terms + Data files for gbgoffice, containing English-Bulgarian dictionary of + commonly used computer terms. + . + Target users are translators of software into Bulgarian. --- bgoffice-computer-terms-0.0.200802171847.orig/debian/compat +++ bgoffice-computer-terms-0.0.200802171847/debian/compat @@ -0,0 +1 @@ +5 --- bgoffice-computer-terms-0.0.200802171847.orig/debian/copyright +++ bgoffice-computer-terms-0.0.200802171847/debian/copyright @@ -0,0 +1,39 @@ +This package was debianized by Damyan Ivanov on +Fri, 25 May 2007 12:30:00 +0300. + +It was downloaded from + +Upstream Author: Mikhail Balabanov + +Copyright: + Copyright (C) 2004-2008 Michail Balabanov + +License: + The original license text is in Bulgarian. Quoted here, translation follows + + © Михаил Балабанов, 2004–2008 + Предоставя се разрешение за копиране, разпространение и/или модификация на + този документ съгласно условията на Лиценза за свободна документация на + GNU, Версия 1.2 или всяка следваща версия, издадена от Фондация „Свободен + софтуер“; без Непроменливи раздели, Текстове на предната корица и Текстове + на задната корица. Официалният (правно обвързващ) текст на лиценза на + английски език е достъпен на адрес http://www.gnu.org/copyleft/fdl.html. + Информативен превод на български (без правна сила) можете да намерите на + адрес http://bg.wikipedia.org/wiki/GFDL-BG. + + -- English translation + Copyright (c) 2004-2008, Mikhail Balabanov + Permission is granted to copy, distribute and/or modify this document under + the terms of the GNU Free Documentation License, Version 1.2 or any later + version published by the Free Software Foundation; with no Invariant + Sections, no Front-Cover Texts, and no Back-Cover Texts. The official + (legally binding) text of the license can be found on + http://www.gnu.org/copyleft/fdl.html. Informal Bulgarian translation (with + no legal weight) can be found on http://bg.wikipedia.org/wiki/GFDL-BG. + +On Debian systems, the full text of GNU Free Documentation License can be found +at /usr/share/common-licenses/GFDL + +The Debian packaging is (C) 2007,2008 Damyan Ivanov and is +licensed under GNU General Public License, version 2. see +`/usr/share/common-licenses/GPL-2'. --- bgoffice-computer-terms-0.0.200802171847.orig/debian/install +++ bgoffice-computer-terms-0.0.200802171847/debian/install @@ -0,0 +1 @@ +computer-terms.dat debian/computer-terms.dict usr/share/bgoffice --- bgoffice-computer-terms-0.0.200802171847.orig/debian/computer-terms.dict +++ bgoffice-computer-terms-0.0.200802171847/debian/computer-terms.dict @@ -0,0 +1,5 @@ +type=en +data=computer-terms.dat +name=Dictionary of Computer Terms +name.bg= +version=1.0