He:דביאן

From Gramps
Revision as of 15:37, 31 May 2021 by Avma (talk | contribs) (Translation)
Jump to: navigation, search

גרסה 4.x ומעלה

בדיקות .debs ניתן למצוא באתר http://sourceforge.net/projects/gramps/files/Unstable/

Gramps 4 moved to setuptool/distutils installer.

תלויות

  • דביאן

תחילה יש להתקין את החבילות והספריות המשותפות הנדרשות לגרסת גמפס דביאן. להלן שורת פקודה אותה ניתן להעתיק ןלהדביק למסוף המערכת.

sudo apt-get install devscripts dpkg-dev fakeroot debhelper dh-linktree
  • stdeb, המייצרת חבילות מקור של דביאן מחבילות פייטון באמצעות פקודה distutils חדשה, sdist_dsc. ברירות מחדל אוטומטיות מסופקות עבור חבילת דביאן, אך ניתן להתאים אישית היבטים רבים של החבילה שתתקבל.

פקודה נוספת, bdist_deb, יוצרת חבילה בינארית של דביאן, קובץ .deb. פקודת דביאן בונה debian/ מחיצת ישירות לצד setup.py.

sudo apt-get install python-stdeb python3-all

בניה

  • אזהרה
    • המשגר ב-r /usr/bin/gramps משתמש באותו נתיב של הגרסה היציבה האחרונה וגרסת בדיקות זו, לכן. גבו את המשגר להתקנת שתי הגרסאות. גם תרגומים עשויים להדרס., ראו הוזהרתם...
    • נדרשת לפחות גרסת 3.3.2 של python-gobject עבור גרמפס 4.x.
    • לא ניתן להשתמש בגרסה גבוהה מ- 2.28 של python-gobject עבור גרמפס 3.4.x.

באמצעות פקודת שורה

python setup.py --command-packages=stdeb.command bdist_deb
  • Custom tarball
python setup.py --command-packages=stdeb.command sdist_dsc

או

python setup.py --command-packages=stdeb.command sdist_dsc --depends "python-gobject (>= 3.3.2)"

באמצאות אפשרויות מותאמות

אפשרויות אלו נקבעול במחיצת /debian.

cd debian
export DEBEMAIL='...@...'
export DEBFULLNAME='Your name'
cd ..
dch -v 4.0.0 "New upstream for Gramps 4.0.0"
dpkg-buildpackage -rfakeroot

באמצעות Distutils

דוגמאות :

בדיקה

$ lintian gramps_4.0.1-2_all.deb
W: gramps: old-fsf-address-in-copyright-file
W: gramps: extra-license-file usr/share/doc/gramps/COPYING.gz
W: gramps: package-contains-upstream-install-documentation usr/share/doc/gramps/INSTALL
W: gramps: extra-license-file usr/share/doc/gramps/LICENSE.gz
W: gramps: menu-icon-missing usr/share/pixmaps/gramps.xpm

webapp חבילת

  • כיצג לכלול את Makefile בחבילה?

setup.py:

- package_data_webapp = ['webapp/*.sql', 'webapp/grampsdb/sql/*.sql']
+ package_data_webapp = ['webapp/*.sql', 'webapp/Makefile', 'webapp/grampsdb/sql/*.sql']
  • תלוי ב: python-django, python-sqlite

בקרה:

Package: python-gramps-webapp
Architecture: all
Depends:
 python-django,
 python-sqlite,
 ${misc:Depends},
 ${python:Depends}

כללים:

#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v
%:
    dh $@ --with python2
# Override auto test because upstream do not use the standard unittest discover
override_dh_auto_test:
# Override of auto_build
override_dh_auto_build:
      python setup.py --server build
# Override of auto_install to remove information from package
override_dh_auto_install:
       #dh_auto_install
       python setup.py --server install --root=debian/python-gramps-webapp --install-layout=deb
# Make css style sheets and templates non-executable
override_dh_fixperms:
       dh_fixperms
       chmod a-x $(CURDIR)/debian/python-gramps-webapp/usr/share/gramps/css/Web_*.css
       chmod a-x $(CURDIR)/debian/python-gramps-webapp/usr/share/gramps/templates/*.html
# Avoid compressing COPYING file so that it can appear in the "About" dialog
override_dh_compress:
       #dh_compress -X COPYING
  • python 3

בקרה:

X-Python3-Version: >= 3.2

Package: python3-gramps-webapp
Architecture: all
Depends:
 python3-django,
 python3-sqlite,
 ${misc:Depends},
 ${python3:Depends}

כללים:

#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v
%:
    dh $@ --with python3
# Override auto test because upstream do not use the standard unittest discover
override_dh_auto_test:
# Override of auto_build
override_dh_auto_build:
      python3 setup.py --server build
# Override of auto_install to remove information from package
override_dh_auto_install:
       #dh_auto_install
       python3 setup.py --server install --root=debian/python3-gramps-webapp --install-layout=deb
# Make css style sheets and templates non-executable
override_dh_fixperms:
       dh_fixperms
       chmod a-x $(CURDIR)/debian/python3-gramps-webapp/usr/share/gramps/css/Web_*.css
       chmod a-x $(CURDIR)/debian/python3-gramps-webapp/usr/share/gramps/templates/*.html
# Avoid compressing COPYING file so that it can appear in the "About" dialog
override_dh_compress:
       #dh_compress -X COPYING

qml חבילת

  • תלוי ב: python-pyside, gramps

הנחיות ליצירת חבילת דביאן עבור אובונטו

  • משיכת הגרסה הדרושה; לדוגמה, לבנית קובץ .deb לגרמפס 5.2.1, יידרש להריץ:
git clone http://git.code.sf.net/p/gramps/source Gramps
git checkout v5.2.1 -b 5.2.1
  • יצירת קובצי יומן השינויים (Changelog files):
git log v5.2.1.. --pretty --numstat --summary --no-merges | git2cl > ChangeLog
git log v5.2.1.. --pretty --numstat --summary --no-merges -- po/*.po | git2cl > po/ChangeLog

שימוש בקובצי Changelog שחוללו עם git2cl,

עריכת MANIFEST.in

+ include ChangeLog
+ include po/ChangeLog
  • פרטים על אופן האריזה בקבצי deb, מהם התלויות, תסריטי טרום ולאחר התקנה והסרה וכו 'נמצאים במחיצה debian/. נא לעיין ב מדריך התחזוקה החדש של דביאן לפרטים נוספים.