From 998f0197104bd19d9e7718c876a563f60464be0f Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 19 Mar 2021 11:05:17 +0900 Subject: [PATCH] create gcmd-1-12 branch --- .gitignore | 1 + create-gcmd-git-bare-tarball.sh | 28 ++++ ...r-1.10.3-open-property-keypress-bz96.patch | 96 ----------- ...der-1.10.3-tags-exiv2-byte-confusion.patch | 11 -- gnome-commander.spec | 158 +++++++++++++----- sources | 2 +- 6 files changed, 142 insertions(+), 154 deletions(-) create mode 100644 create-gcmd-git-bare-tarball.sh delete mode 100644 gnome-commander-1.10.3-open-property-keypress-bz96.patch delete mode 100644 gnome-commander-1.10.3-tags-exiv2-byte-confusion.patch diff --git a/.gitignore b/.gitignore index 29d989c..facffa3 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ gnome-commander-1.2.8.7.tar.bz2 /gnome-commander-1.10.1.tar.xz /gnome-commander-1.10.2.tar.xz /gnome-commander-1.10.3.tar.xz +/gnome-commander-20210319T1025.tar.gz diff --git a/create-gcmd-git-bare-tarball.sh b/create-gcmd-git-bare-tarball.sh new file mode 100644 index 0000000..6ec6fa7 --- /dev/null +++ b/create-gcmd-git-bare-tarball.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -x +set -e + +REPONAME=gnome-commander +GITURL=https://gitlab.gnome.org/GNOME/${REPONAME}.git +BRANCH=gcmd-1-12 + +DATE=$(date '+%Y%m%d') +TIME=$(date '+%H%M') + +TARNAME=${REPONAME}-${DATE}T${TIME}.tar.gz + +PWDDIR=$(pwd) +TMPDIR=$(mktemp -d /var/tmp/${REPONAME}-XXXXXX) +pushd $TMPDIR + +git clone --mirror $GITURL +tar czf ${TARNAME} ${REPONAME}.git/ + +pushd ${REPONAME}.git/ +git log --first-parent --format=fuller ${BRANCH} | head -n 12 +popd + +cp -p ${TARNAME} $PWDDIR +popd +rm -rf $TMPDIR diff --git a/gnome-commander-1.10.3-open-property-keypress-bz96.patch b/gnome-commander-1.10.3-open-property-keypress-bz96.patch deleted file mode 100644 index 3251151..0000000 --- a/gnome-commander-1.10.3-open-property-keypress-bz96.patch +++ /dev/null @@ -1,96 +0,0 @@ -From aa40e0ee762dce8f33af945a002bab52257486ad Mon Sep 17 00:00:00 2001 -From: Uwe Scholz -Date: Mon, 22 Feb 2021 22:48:38 +0100 -Subject: [PATCH] Open properties popup by keypress at the position of the - file/directory in the file list, fixing #96 - ---- - NEWS | 1 + - doc/C/releases.xml | 3 +++ - src/gnome-cmd-file-list.cc | 47 ++++++++++++++++++++++++++------------ - 3 files changed, 36 insertions(+), 15 deletions(-) - -diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc -index d4f1d417..d21578e2 100644 ---- a/src/gnome-cmd-file-list.cc -+++ b/src/gnome-cmd-file-list.cc -@@ -808,28 +808,45 @@ static char *build_selected_file_list (GnomeCmdFileList *fl, int *file_list_len) - } - - --static void show_file_popup (GnomeCmdFileList *fl, GdkEventButton *event) -+static void get_popup_pos (GtkMenu *menu, gint *x, gint *y, gboolean push_in, GnomeCmdFileList *gnomeCmdFileList) - { -- // create the popup menu -- GtkWidget *menu = gnome_cmd_file_popmenu_new (fl); -- if (!menu) return; -+ g_return_if_fail (GNOME_CMD_IS_FILE_LIST (gnomeCmdFileList)); - -- g_object_ref (menu); -- g_object_set_data_full (*fl, "file_popup_menu", menu, g_object_unref); -+ gint w, h; - -- gtk_menu_popup (GTK_MENU (menu), nullptr, nullptr, nullptr, fl, event->button, event->time); -+ get_focus_row_coordinates (gnomeCmdFileList, *x, *y, w, h); - } - - --inline void show_file_popup_with_warp (GnomeCmdFileList *fl) -+static void show_file_popup (GnomeCmdFileList *fl, GdkEventButton *event) - { -- gint x, y, w, h; -- -- get_focus_row_coordinates (fl, x, y, w, h); -+ // create the popup menu -+ GtkWidget *menu = gnome_cmd_file_popmenu_new (fl); -+ if (!menu) return; - -- //FIXME: Warp the pointer to x, y here -+ g_object_ref (menu); -+ g_object_set_data_full (*fl, "file_popup_menu", menu, g_object_unref); - -- show_file_popup (fl, nullptr); -+ if (event) -+ { -+ gtk_menu_popup (GTK_MENU (menu), -+ nullptr, -+ nullptr, -+ nullptr, -+ fl, -+ event->button, -+ event->time); -+ } -+ else -+ { -+ gtk_menu_popup (GTK_MENU (menu), -+ nullptr, -+ nullptr, -+ (GtkMenuPositionFunc) get_popup_pos, -+ fl, -+ 0, -+ gtk_get_current_event_time ()); -+ } - } - - -@@ -2480,7 +2497,7 @@ gboolean GnomeCmdFileList::key_pressed(GdkEventKey *event) - return TRUE; - - case GDK_F10: -- show_file_popup_with_warp (this); -+ show_file_popup (this, nullptr); - return TRUE; - - case GDK_Left: -@@ -2662,7 +2679,7 @@ gboolean GnomeCmdFileList::key_pressed(GdkEventKey *event) - return TRUE; - - case GDK_Menu: -- show_file_popup_with_warp (this); -+ show_file_popup (this, nullptr); - return TRUE; - - default: --- -GitLab - diff --git a/gnome-commander-1.10.3-tags-exiv2-byte-confusion.patch b/gnome-commander-1.10.3-tags-exiv2-byte-confusion.patch deleted file mode 100644 index ad710dd..0000000 --- a/gnome-commander-1.10.3-tags-exiv2-byte-confusion.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gnome-commander-1.10.3/src/tags/gnome-cmd-tags-exiv2.cc.debug 2020-04-15 22:16:27.000000000 +0900 -+++ gnome-commander-1.10.3/src/tags/gnome-cmd-tags-exiv2.cc 2021-02-23 22:09:11.236969469 +0900 -@@ -74,7 +74,7 @@ - case TAG_EXIF_FLASHPIXVERSION: - case TAG_EXIF_INTEROPERABILITYVERSION: - { -- vector buff(i->value().size()+1); -+ vector buff(i->value().size()+1); - - i->value().copy(&buff[0],invalidByteOrder); - metadata->add(tag,(char *) &buff[0]); diff --git a/gnome-commander.spec b/gnome-commander.spec index 422f02b..ddd046b 100644 --- a/gnome-commander.spec +++ b/gnome-commander.spec @@ -1,40 +1,46 @@ -# To use git, follow: -# -# git clone git://git.gnome.org/gnome-commander -# cd gnome-commander/ -# git checkout -b gcmd-1-3 origin/gcmd-1-3 -# git pull -# ... -# cd .. -# ln -sf gcmd-commander gnome-commander-%%{version}-git_%%{git_pull_JST} -# tar cjf gnome-commander-%%{version}-git_%%{git_pull_JST}.tar.xz \ -# gnome-commander-%%{version}-git_%%{git_pull_JST}/./ - -# Source10 is created by: -# svn co http://svn.gnome.org/svn/gnome-commander/branches/gcmd-1-3/tools/mimeedit/ -# cp -p mimeedit/mimeedit.sh mimeedit-rev%%{mimeedit_rev}.sh -# -# ref: http://lists.gnu.org/archive/html/gcmd-devel/2007-11/msg00076.html - # gcmd plugins uses symbols defined in gcmd binary %undefine _strict_symbol_defs_build %global EXIV2_REQ 0.14 -%global TAGLIB_REQ 1.4 +%global GLIB_REQ 2.44.0 %global LIBGSF_REQ 1.12.0 %global POPPLER_REQ 0.8 +%global TAGLIB_REQ 1.4 -%global git_pull_JST D20150504 -%global githash 5a4806f7e5789a7d29d62550e9128436ffdef00a -%global shorthash %(c=%{githash}; echo ${c:0:7}) +%global mimeedit_rev 1958 %global use_autotool 0 %global update_po 0 %global if_pre 0 -%global main_release 3 -#%%global extratag %{git_pull_JST}git%{shorthash} -%undefine extratag -%global mimeedit_rev 1958 + + +%global use_release 0 +%global use_gitbare 1 + +%if 0%{?use_gitbare} < 1 +# force +%global use_release 1 +%endif + +%if 0%{?use_gitbare} +%global gittardate 20210319 +%global gittartime 1025 +%global gitbaredate 20210318 +%global git_rev 3ebb680e6a181d1dc6f7c3a188f3d5d90ff26d32 +%global git_short %(echo %{git_rev} | cut -c-8) +%global git_version D%{gitbaredate}git%{git_short} + +%global if_pre 1 +%endif + +%global mainrel 0.1 + +%if 0%{?use_release} >= 1 +%global fedorarel %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}} +%endif +%if 0%{?use_gitbare} >= 1 +%global fedorarel %{mainrel}.%{git_version} +%endif %if 0%{?if_pre} > 0 %global use_autotool 1 @@ -50,29 +56,28 @@ # under doc/ diretory, need investigating %global use_autotool 1 -%global fedora_rel %( [ 0%{?if_pre} -gt 0 ] && echo 0. )%{main_release}%{?extratag:.%extratag} - Name: gnome-commander -Version: 1.10.3 +Version: 1.12 # Downgrade 3 times, sorry... Epoch: 4 -Release: %{fedora_rel}%{?dist} +Release: %{fedorarel}%{?dist} Summary: A nice and fast file manager for the GNOME desktop Summary(pl): Menadżer plików dla GNOME oparty o Norton Commander'a (TM) Summary(sv): GNOME Commander är en snabb och smidig filhanderare för GNOME License: GPLv2+ URL: http://gcmd.github.io/ +%if 0%{?use_release} Source0: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.10/%{name}-%{version}%{?extratag:-%extratag}.tar.xz -#Source0: https://git.gnome.org/browse/gnome-commander/snapshot/%{name}-%{githash}.tar.xz +%endif +%if 0%{?use_gitbare} +Source0: %{name}-%{gittardate}T%{gittartime}.tar.gz +%endif Source1: gnome-commander.sh +# Source0 is created from Source2 +Source2: create-gcmd-git-bare-tarball.sh Source10: mimeedit-svn%{mimeedit_rev}.sh Patch1: gnome-commander-1.6.0-path-fedora-specific.patch -# https://gitlab.gnome.org/GNOME/gnome-commander/-/issues/96 -# https://gitlab.gnome.org/GNOME/gnome-commander/-/commit/aa40e0ee762dce8f33af945a002bab52257486ad -Patch101: gnome-commander-1.10.3-open-property-keypress-bz96.patch -# https://gitlab.gnome.org/GNOME/gnome-commander/-/merge_requests/5 -Patch102: gnome-commander-1.10.3-tags-exiv2-byte-confusion.patch BuildRequires: gcc-c++ @@ -83,6 +88,9 @@ BuildRequires: scrollkeeper BuildRequires: chmlib-devel BuildRequires: pkgconfig(exiv2) >= %{EXIV2_REQ} +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(gnome-vfs-2.0) BuildRequires: pkgconfig(libgsf-1) >= %{LIBGSF_REQ} BuildRequires: pkgconfig(poppler-glib) >= %{POPPLER_REQ} @@ -103,6 +111,8 @@ BuildRequires: libtool BuildRequires: gnome-common %endif BuildRequires: make +BuildRequires: %{_bindir}/git +BuildRequires: %{_bindir}/appstream-util Requires: gnome-vfs2-smb Requires: meld @@ -137,12 +147,42 @@ Utöver att kunna hantera filer på din egen dator så kan programmet även ansluta till FTP-servrar och SMB-nätverk. %prep -%setup -q -n %{name}-%{version}%{?extratag:-%extratag} -#%%setup -q -n %{name}-%{githash} +%if 0%{?use_release} +%setup -q + +git init +%endif + +%if 0%{?use_gitbare} +%setup -q -c -T -a 0 +git clone ./%{name}.git/ +cd %{name} + +git checkout -b %{version}-fedora %{git_rev} +cp -a [A-Z]* .. +cp -a doc .. + +cat > GITHASH < 0 ( export NOCONFIGURE=1 ; sh autogen.sh ) @@ -152,6 +192,10 @@ ansluta till FTP-servrar och SMB-nätverk. -e 's|\$PY_EXEC_PREFIX/lib|%{_libdir}|' \ configure +%if 0%{?use_gitbare} +pushd .. +%endif + # gzip gzip -9 ChangeLog-* @@ -159,8 +203,17 @@ mkdir TMPBINDIR cd TMPBINDIR ln -sf /bin/true ./update-mime-database +%if 0%{?use_gitbare} +popd +%endif + %build export PATH=$(pwd)/TMPBINDIR:$PATH +export BUILD_TOP_DIR=$(pwd) + +%if 0%{?use_gitbare} +pushd %{name} +%endif # Install wrapper script, and move binaries to # %%{_libexecdir}/%%{name} @@ -184,10 +237,11 @@ ln -sf ../configure %configure \ --srcdir=$(pwd)/.. \ --bindir=%{_libexecdir}/%{name} \ + --disable-werror \ --disable-scrollkeeper \ - --enable-python + %{nil} -%{__cp} -p README .. +%{__cp} -p README ${BUILD_TOP_DIR} %if %{update_po} %{__make} -C po gnome-commander.pot update-po @@ -202,11 +256,19 @@ ln -sf ../configure popd # from _builddir +%if 0%{?use_gitbare} +popd +%endif + %install %{__rm} -rf %{buildroot} export PATH=$(pwd)/TMPBINDIR:$PATH +%if 0%{?use_gitbare} +pushd %{name} +%endif + pushd _builddir %{__make} \ INSTALL="%{__install} -c -p" \ @@ -235,8 +297,15 @@ desktop-file-install \ %{__rm} -f %{buildroot}%{_libdir}/%{name}/*.{a,la} %{__rm} -f %{buildroot}%{_libdir}/%{name}/*/*.{a,la} +%if 0%{?use_gitbare} +popd +%endif + %find_lang %{name} +%check +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml + %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS @@ -254,13 +323,10 @@ desktop-file-install \ %{_mandir}/man1/%{name}.1* %{_datadir}/applications/%{name}.desktop -%{_datadir}/metainfo/%{name}.appdata.xml +%{_metainfodir}/%{name}.appdata.xml %{_datadir}/help/*/%{name}/ -%dir %{_datadir}/%{name} -%{_datadir}/%{name}/mime - %{_datadir}/glib-2.0/schemas/org.gnome.*xml %{_datadir}/pixmaps/%{name}.svg diff --git a/sources b/sources index 87f6afe..f5ee1fa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-commander-1.10.3.tar.xz) = 87c4df1534747f21b15e48141180601aef02152b1eef097986b0f8675a6d24e75a81ccb7d0b41b2df38cd40eadae2b0bd09f8e0274a5e5cd8bbd8d23df6ffd7f +SHA512 (gnome-commander-20210319T1025.tar.gz) = df76d983f9a94c88cf415113df967c688c7faa8ee4377aab32ac702c27531ba54893ded19055ccdce13f5c3aab067bda9b771e3dcc2911d9981a2427095d0b36