Difference between revisions of "He:דביאן"

From Gramps
Jump to: navigation, search
(rtl)
m (בניה: fix)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{languages|Debian}}
 
{{languages|Debian}}
 
<div dir="rtl" lang="he" class="mw-content-rtl">
 
<div dir="rtl" lang="he" class="mw-content-rtl">
= For version 4.x and newer =
+
= גרסה 4.x ומעלה =
  
'''Testing .debs can be found in http://sourceforge.net/projects/gramps/files/Unstable/'''
+
'''בדיקות .debs ניתן למצוא באתר http://sourceforge.net/projects/gramps/files/Unstable/'''
  
 
{{man menu|Gramps 4 moved to setuptool/distutils installer.}}
 
{{man menu|Gramps 4 moved to setuptool/distutils installer.}}
  
==Dependency==
+
==תלויות==
 
 
* debian stuff
 
  
 +
* דביאן
 +
תחילה יש להתקין את החבילות והספריות המשותפות הנדרשות לגרסת גמפס דביאן. להלן שורת פקודה אותה ניתן להעתיק ןלהדביק למסוף המערכת.
 +
<div dir="ltr">
 
  sudo apt-get install devscripts dpkg-dev fakeroot debhelper dh-linktree
 
  sudo apt-get install devscripts dpkg-dev fakeroot debhelper dh-linktree
 
+
</div>
* [https://github.com/astraw/stdeb stdeb], which produces Debian source packages from Python packages via a new distutils command, sdist_dsc. Automatic defaults are provided for the Debian package, but many aspects of the resulting package can be customized. An additional command, bdist_deb, creates a Debian binary package, a .deb file. The debianize command builds a debian/ directory directly alongside your setup.py.
+
* [https://github.com/astraw/stdeb stdeb], המייצרת חבילות מקור של דביאן מחבילות פייטון באמצעות פקודה distutils חדשה, sdist_dsc. ברירות מחדל אוטומטיות מסופקות עבור חבילת דביאן, אך ניתן להתאים אישית היבטים רבים של החבילה שתתקבל.  
 
+
פקודה נוספת, bdist_deb, יוצרת חבילה בינארית של דביאן, קובץ .deb. פקודת דביאן בונה debian/ מחיצת ישירות לצד setup.py.
 +
<div dir="ltr">
 
  sudo apt-get install python-stdeb python3-all
 
  sudo apt-get install python-stdeb python3-all
 +
</div>
  
==Build==
+
==בניה==
  
*'''WARNING'''
+
*'''אזהרה'''
** The launcher under ''/usr/bin/gramps'' is using the '''same path''' for current stable release and this testing version. '''Backup your launcher''' if you want to install both versions. Translations might be also overwritten, you have been warned...
+
** המשגר ב- ''/usr/bin/gramps'' משתמש באותו  '''נתיב''' של הגרסה היציבה האחרונה וגרסת בדיקות זו, לכן. '''גבו את המשגר''' להתקנת שתי הגרסאות. גם תרגומים עשויים להדרס., ראו הוזהרתם...
** You need at least version '''3.3.2''' of python-gobject for Gramps '''4.x'''.
+
** נדרשת לפחות גרסת '''3.3.2''' של python-gobject עבור גרמפס '''4.x'''.
** You cannot use greater version than '''2.28''' of python-gobject for Gramps '''3.4.x'''.
+
** לא ניתן להשתמש בגרסה גבוהה מ- '''2.28''' של python-gobject עבור גרמפס '''3.4.x'''.
 
 
===via a quick command line===
 
  
 +
===באמצעות פקודת שורה ===
 +
<div dir="ltr">
 
  python setup.py --command-packages=stdeb.command bdist_deb
 
  python setup.py --command-packages=stdeb.command bdist_deb
 
+
</div>
* Custom tarball
+
* מותאם אישית tarball
 
+
<div dir="ltr">
 
  python setup.py --command-packages=stdeb.command sdist_dsc
 
  python setup.py --command-packages=stdeb.command sdist_dsc
 
+
</div>
or
+
או
 
+
<div dir="ltr">
 
  python setup.py --command-packages=stdeb.command sdist_dsc --depends "python-gobject (>= 3.3.2)"
 
  python setup.py --command-packages=stdeb.command sdist_dsc --depends "python-gobject (>= 3.3.2)"
 +
</div>
 +
===באמצאות אפשרויות מותאמות===
  
===via customized options===
+
אפשרויות אלו נקבעול במחיצת ''/debian''.
 
+
<div dir="ltr">
These options are set into ''/debian'' folder.
 
 
 
 
  cd debian
 
  cd debian
 
  export DEBEMAIL='...@...'
 
  export DEBEMAIL='...@...'
Line 46: Line 49:
 
  dch -v 4.0.0 "New upstream for Gramps 4.0.0"
 
  dch -v 4.0.0 "New upstream for Gramps 4.0.0"
 
  dpkg-buildpackage -rfakeroot
 
  dpkg-buildpackage -rfakeroot
 +
</div>
 +
===באמצעות Distutils===
  
===via Distutils===
+
דוגמאות:  
 
 
Samples :  
 
  
 
* https://github.com/astraw/stdeb/blob/master/stdeb/command/
 
* https://github.com/astraw/stdeb/blob/master/stdeb/command/
 
* https://github.com/kelvan/gotoVienna/blob/master/bdist_hdeb.py
 
* https://github.com/kelvan/gotoVienna/blob/master/bdist_hdeb.py
  
==Test==
+
==בדיקה==
+
<div dir="ltr">
 
  $ lintian gramps_4.0.1-2_all.deb
 
  $ lintian gramps_4.0.1-2_all.deb
 
  W: gramps: old-fsf-address-in-copyright-file
 
  W: gramps: old-fsf-address-in-copyright-file
Line 62: Line 65:
 
  W: gramps: extra-license-file usr/share/doc/gramps/LICENSE.gz
 
  W: gramps: extra-license-file usr/share/doc/gramps/LICENSE.gz
 
  W: gramps: menu-icon-missing usr/share/pixmaps/gramps.xpm
 
  W: gramps: menu-icon-missing usr/share/pixmaps/gramps.xpm
 +
</div>
 +
==webapp חבילת==
  
==webapp package==
+
* כיצג לכלול את Makefile בחבילה?
 
 
* How to include Makefile into deb package?
 
  
 
setup.py:
 
setup.py:
  
 +
<div dir="ltr" lamg="en">
 
  - package_data_webapp = ['webapp/*.sql', 'webapp/grampsdb/sql/*.sql']
 
  - package_data_webapp = ['webapp/*.sql', 'webapp/grampsdb/sql/*.sql']
 
  + package_data_webapp = ['webapp/*.sql', 'webapp/Makefile', 'webapp/grampsdb/sql/*.sql']
 
  + package_data_webapp = ['webapp/*.sql', 'webapp/Makefile', 'webapp/grampsdb/sql/*.sql']
 +
</div>
 +
* תלוי ב: python-django, python-sqlite
  
* Depends on python-django, python-sqlite
+
בקרה:
 
+
<div dir="ltr" lamg="en">
Control:
 
 
 
 
  Package: python-gramps-webapp
 
  Package: python-gramps-webapp
 
  Architecture: all
 
  Architecture: all
Line 83: Line 87:
 
   ${misc:Depends},
 
   ${misc:Depends},
 
   ${python:Depends}
 
   ${python:Depends}
 
+
</div>
Rules:
+
כללים:
 
+
<div dir="ltr" lamg="en">
 
  #!/usr/bin/make -f
 
  #!/usr/bin/make -f
  
Line 91: Line 95:
 
  export DH_VERBOSE=1
 
  export DH_VERBOSE=1
 
  export DH_OPTIONS=-v
 
  export DH_OPTIONS=-v
 
+
</div>
 
  %:
 
  %:
 +
<div dir="ltr" lamg="en">
 
     dh $@ --with python2
 
     dh $@ --with python2
 
+
</div>
 
  # Override auto test because upstream do not use the standard unittest discover
 
  # Override auto test because upstream do not use the standard unittest discover
 
  override_dh_auto_test:
 
  override_dh_auto_test:
Line 100: Line 105:
 
  # Override of auto_build
 
  # Override of auto_build
 
  override_dh_auto_build:
 
  override_dh_auto_build:
 +
<div dir="ltr" lamg="en">
 
       python setup.py --server build
 
       python setup.py --server build
 
+
</div>
 
  # Override of auto_install to remove information from package
 
  # Override of auto_install to remove information from package
 
  override_dh_auto_install:
 
  override_dh_auto_install:
 
         #dh_auto_install
 
         #dh_auto_install
 +
<div dir="ltr" lamg="en">
 
         python setup.py --server install --root=debian/python-gramps-webapp --install-layout=deb
 
         python setup.py --server install --root=debian/python-gramps-webapp --install-layout=deb
 
+
</div>
 
  # Make css style sheets and templates non-executable
 
  # Make css style sheets and templates non-executable
 
  override_dh_fixperms:
 
  override_dh_fixperms:
 
         dh_fixperms
 
         dh_fixperms
 +
<div dir="ltr" lamg="en">
 
         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/css/Web_*.css
 
         chmod a-x $(CURDIR)/debian/python-gramps-webapp/usr/share/gramps/templates/*.html
 
         chmod a-x $(CURDIR)/debian/python-gramps-webapp/usr/share/gramps/templates/*.html
 
+
</div>
 
  # Avoid compressing COPYING file so that it can appear in the "About" dialog
 
  # Avoid compressing COPYING file so that it can appear in the "About" dialog
 
  override_dh_compress:
 
  override_dh_compress:
Line 119: Line 127:
 
* python 3
 
* python 3
  
Control:
+
בקרה:
  
 
X-Python3-Version: >= 3.2
 
X-Python3-Version: >= 3.2
 
+
<div dir="ltr" lamg="en">
 
  Package: python3-gramps-webapp
 
  Package: python3-gramps-webapp
 
  Architecture: all
 
  Architecture: all
Line 130: Line 138:
 
   ${misc:Depends},
 
   ${misc:Depends},
 
   ${python3:Depends}
 
   ${python3:Depends}
 
+
</div>
Rules:
+
כללים:
 
+
<div dir="ltr" lamg="en">
 
  #!/usr/bin/make -f
 
  #!/usr/bin/make -f
 
+
</div>
 
  # Uncomment this to turn on verbose mode.
 
  # Uncomment this to turn on verbose mode.
 +
<div dir="ltr" lamg="en">
 
  export DH_VERBOSE=1
 
  export DH_VERBOSE=1
 
  export DH_OPTIONS=-v
 
  export DH_OPTIONS=-v
 
+
</div>
 
  %:
 
  %:
 +
<div dir="ltr" lamg="en">
 
     dh $@ --with python3
 
     dh $@ --with python3
 
+
</div>
 
  # Override auto test because upstream do not use the standard unittest discover
 
  # Override auto test because upstream do not use the standard unittest discover
 
  override_dh_auto_test:
 
  override_dh_auto_test:
Line 147: Line 157:
 
  # Override of auto_build
 
  # Override of auto_build
 
  override_dh_auto_build:
 
  override_dh_auto_build:
 +
<div dir="ltr">
 
       python3 setup.py --server build
 
       python3 setup.py --server build
 
+
</div>
 
  # Override of auto_install to remove information from package
 
  # Override of auto_install to remove information from package
 
  override_dh_auto_install:
 
  override_dh_auto_install:
 +
<div dir="ltr">
 
         #dh_auto_install
 
         #dh_auto_install
 
         python3 setup.py --server install --root=debian/python3-gramps-webapp --install-layout=deb
 
         python3 setup.py --server install --root=debian/python3-gramps-webapp --install-layout=deb
 
+
</div>
 
  # Make css style sheets and templates non-executable
 
  # Make css style sheets and templates non-executable
 
  override_dh_fixperms:
 
  override_dh_fixperms:
 +
<div dir="ltr">
 
         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/css/Web_*.css
 
         chmod a-x $(CURDIR)/debian/python3-gramps-webapp/usr/share/gramps/templates/*.html
 
         chmod a-x $(CURDIR)/debian/python3-gramps-webapp/usr/share/gramps/templates/*.html
 
+
</div>
 
  # Avoid compressing COPYING file so that it can appear in the "About" dialog
 
  # Avoid compressing COPYING file so that it can appear in the "About" dialog
 
  override_dh_compress:
 
  override_dh_compress:
 +
<div dir="ltr">
 
         #dh_compress -X COPYING
 
         #dh_compress -X COPYING
 +
</div>
 +
==qml חבילת==
  
==qml package==
+
* תלוי ב:  python-pyside, gramps
  
*Depends on  python-pyside, gramps
+
= הנחיות ליצירת חבילת דביאן עבור אובונטו =
  
= Instructions on creating the Debian package for Ubuntu =
+
* משיכת הגרסה הדרושה; לדוגמה, לבנית קובץ <tt>.deb</tt> לגרמפס {{version}}, יידרש להריץ:
 
+
<div dir="ltr">
* Check out the necessary version; for example, to build the <tt>.deb</tt> file for GRAMPS {{version}}, you'll want to run:
 
 
  git clone http://git.code.sf.net/p/gramps/source Gramps
 
  git clone http://git.code.sf.net/p/gramps/source Gramps
 
  git checkout v{{version}} -b {{version}}
 
  git checkout v{{version}} -b {{version}}
 
+
</div>
* Create the Changelog files:
+
* יצירת קובצי יומן השינויים (Changelog files):
 
+
<div dir="ltr">
 
  git log v{{version}}.. --pretty --numstat --summary --no-merges | git2cl > ChangeLog
 
  git log v{{version}}.. --pretty --numstat --summary --no-merges | git2cl > ChangeLog
 
  git log v{{version}}.. --pretty --numstat --summary --no-merges -- po/*.po | git2cl > po/ChangeLog
 
  git log v{{version}}.. --pretty --numstat --summary --no-merges -- po/*.po | git2cl > po/ChangeLog
 
+
</div>
Using the <tt>Changelog</tt> files generated with <tt>git2cl</tt>,
+
שימוש בקובצי <tt>Changelog</tt> שחוללו עם <tt>git2cl</tt>,
 
+
<div dir="ltr">
Modify <tt>MANIFEST.in</tt>
+
עריכת <tt>MANIFEST.in</tt>
 
  + include ChangeLog
 
  + include ChangeLog
 
  + include po/ChangeLog
 
  + include po/ChangeLog
 
+
</div>
* The details on how things are going to be packaged into deb files, what are the dependencies, the pre- and post- install and removal scripts etc are under <tt>debian/</tt> directory. Please refer to the [http://www.debian.org/doc/maint-guide/ Debian New Maintainers' Guide] for further details.
+
* פרטים על אופן האריזה בקבצי deb, מהם התלויות, תסריטי טרום ולאחר  התקנה והסרה וכו 'נמצאים במחיצה <tt>debian/</tt>. נא לעיין ב [http://www.debian.org/doc/maint-guide/ מדריך התחזוקה החדש של דביאן] לפרטים נוספים.
 
 
 
[[Category:He:פתוח/עיצוב]]
 
[[Category:He:פתוח/עיצוב]]

Latest revision as of 15:41, 31 May 2021

גרסה 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

בניה

  • אזהרה
    • המשגר ב- /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
  • מותאם אישית 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/. נא לעיין ב מדריך התחזוקה החדש של דביאן לפרטים נוספים.