diff --git a/.gitignore b/.gitignore index 6c90466..86448a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -gpicview-0.2.1.tar.gz -/gpicview-0.2.4.tar.gz -/gpicview-0.2.5.tar.xz +/gpicview-*.tar.gz +/gpicview-*.tar.xz diff --git a/create-gpicview-git-bare-tarball.sh b/create-gpicview-git-bare-tarball.sh new file mode 100644 index 0000000..f2fe16b --- /dev/null +++ b/create-gpicview-git-bare-tarball.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -x +set -e + +REPONAME=gpicview +GITURL=https://github.com/lxde/${REPONAME}.git + +DATE=$(date '+%Y%m%d') +TIME=$(date '+%H%M') + +TARNAME=${REPONAME}-${DATE}T${TIME}.tar.gz + +PWDDIR=$(pwd) +TMPDIR=$(mktemp -d /var/tmp/libfm-XXXXXX) +pushd $TMPDIR + +git clone --mirror $GITURL + +pushd ${REPONAME}.git/ +git log --format=fuller | head -n 12 +popd + +tar czf ${TARNAME} ${REPONAME}.git/ + +cp -p ${TARNAME} $PWDDIR +popd +rm -rf $TMPDIR diff --git a/gpicview.spec b/gpicview.spec index 9dde0eb..718e075 100644 --- a/gpicview.spec +++ b/gpicview.spec @@ -1,19 +1,63 @@ -Name: gpicview -Version: 0.2.5 -Release: 2%{?dist} -Summary: Simple and fast Image Viewer for X +%global use_release 0 +%global use_gitbare 1 -Group: Applications/Multimedia -License: GPLv2+ -URL: http://lxde.sourceforge.net/gpicview/ -Source0: http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.xz +%if 0%{?use_gitbare} < 1 +# force +%global use_release 1 +%endif -BuildRequires: gettext -BuildRequires: intltool -BuildRequires: pkgconfig(gtk+-2.0) -BuildRequires: libjpeg-devel -BuildRequires: desktop-file-utils -Requires: xdg-utils +%global git_version %{nil} +%global git_ver_rpm %{nil} +%global git_builddir %{nil} + +%if 0%{?use_gitbare} +%global gittardate 20250329 +%global gittartime 1449 +%define use_gitcommit_as_rel 0 + +%global gitbaredate 20250327 +%global git_rev ca13623c6176585db4759ce4371fbf89c56fa630 +%global git_short %(echo %{git_rev} | cut -c-8) +%global git_version %{gitbaredate}git%{git_short} +%endif + +%if 0%{?use_gitcommit_as_rel} +%global git_ver_rpm ^%{git_version} +%global git_builddir -%{git_version} +%endif + + +%global main_version 0.3.1 + +Name: gpicview +Version: %{main_version}%{git_ver_rpm} +Release: 2%{?dist} +Summary: Simple and fast Image Viewer for X + +# SPDX confirmed +License: GPL-2.0-or-later +URL: https://github.com/lxde/%{name}/ +%if 0%{?use_gitbare} +Source0: %{name}-%{gittardate}T%{gittartime}.tar.gz +%endif +%if 0%{?use_release} +Source0: https://github.com/lxde/%{name}/archive/%{main_version}/%{name}-%{version}.tar.gz +%endif +Source101: create-gpicview-git-bare-tarball.sh + +BuildRequires: make +BuildRequires: gcc +BuildRequires: gettext +BuildRequires: intltool +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: libjpeg-devel +BuildRequires: desktop-file-utils + +BuildRequires: automake +BuildRequires: libtool +BuildRequires: git + +Requires: /usr/bin/xdg-mime %description Gpicview is an simple and image viewer with a simple and intuitive interface. @@ -23,50 +67,176 @@ developed as the primary image viewer of LXDE, the Lightweight X11 Desktop Environment, it only requires GTK+ and can be used in any desktop environment. %prep -%setup -q +%if 0%{?use_release} +%setup -q -n %{name}-%{main_version}%{git_builddir} + +git init +%endif + +%if 0%{?use_gitbare} +%setup -q -c -T -n %{name}-%{main_version}%{git_builddir} -a 0 +git clone ./%{name}.git/ +cd %{name} + +git checkout -b %{main_version}-fedora %{git_rev} + +# Restore timestamps +set +x +echo "Restore timestamps" +git ls-tree -r --name-only HEAD | while read f +do + unixtime=$(git log -n 1 --pretty='%ct' -- $f) + touch -d "@${unixtime}" $f +done +set -x + +cp -a [A-Z]* .. +%endif + +git config user.name "gpicview Fedora maintainer" +git config user.email "gpicview-maintainers@fedoraproject.org" + +%if 0%{?use_release} +git add . +git commit -m "base" -q +%endif + %build +%if 0%{?use_gitbare} +cd %{name} +%endif + +bash autogen.sh %configure \ + --enable-gtk3 \ --disable-silent-rules \ %{nil} -make %{?_smp_mflags} +%make_build %install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" +%if 0%{?use_gitbare} +cd %{name} +%endif -desktop-file-install --delete-original \ - --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ - --remove-category=Application \ - --remove-category=Utility \ - --remove-category=Photography \ - $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop +%make_install +desktop-file-install \ + --delete-original \ + --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ + --remove-category=Application \ + --remove-category=Utility \ + --remove-category=Photography \ + $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop + +%if 0%{?use_gitbare} +cd .. +%endif %find_lang %{name} -%post -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : -update-desktop-database &> /dev/null || : - -%postun -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi -update-desktop-database &> /dev/null || : - -%posttrans -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - %files -f %{name}.lang -%defattr(-,root,root,-) -%doc COPYING AUTHORS +%license COPYING +%doc AUTHORS + %{_bindir}/gpicview %{_datadir}/applications/*gpicview.desktop -%{_datadir}/gpicview/ +%dir %{_datadir}/gpicview/ +%{_datadir}/gpicview/pixmaps/ +%{_datadir}/gpicview/ui/ %{_datadir}/icons/hicolor/*/apps/%{name}.png +%{_mandir}/man1/%{name}.1* %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 0.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Mar 29 2025 Mamoru TASAKA - 0.3.1-1 +- 0.3.1 + +* Wed Feb 12 2025 Mamoru TASAKA - 0.2.6^20241011git4dbf5125-1 +- Update to the latest git + +* Fri Jan 17 2025 Fedora Release Engineering - 0.2.6^20240818.1git1efbde2a-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Tue Oct 08 2024 Mamoru TASAKA - 0.2.6^20240818.1git1efbde2a-1 +- Update to the latest git + +* Sun Aug 25 2024 Mamoru TASAKA - 0.2.6^20240818gitcfce58f1-1 +- Update to the latest git + +* Thu Jul 18 2024 Fedora Release Engineering - 0.2.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jul 17 2024 Mamoru TASAKA - 0.2.6-1 +- 0.2.6 + +* Wed Jan 24 2024 Fedora Release Engineering - 0.2.5^20231013git95eef260-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jan 20 2024 Fedora Release Engineering - 0.2.5^20231013git95eef260-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Dec 31 2023 Mamoru TASAKA - 0.2.5^20231013git95eef260-1 +- Update to the latest git + +* Fri Sep 15 2023 Mamoru TASAKA - 0.2.5^20230913git3438fc58-1 +- Update to the latest git + +* Sat Aug 19 2023 Mamoru TASAKA - 0.2.5^20230818git583563d2-1 +- Update to the latest git + +* Mon Aug 14 2023 Mamoru TASAKA - 0.2.5^20230802git1c0c9211-1 +- Update to the latest git + +* Thu Jul 20 2023 Fedora Release Engineering - 0.2.5-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 0.2.5-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Aug 27 2022 Mamoru TASAKA - 0.2.5-16 +- Use gtk3 on F-37+ + +* Thu Jul 21 2022 Fedora Release Engineering - 0.2.5-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 0.2.5-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 0.2.5-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 0.2.5-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.2.5-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 0.2.5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 0.2.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 0.2.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.2.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 0.2.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 11 2018 Igor Gnatenko - 0.2.5-5 +- Remove obsolete scriptlets + +* Wed Aug 02 2017 Fedora Release Engineering - 0.2.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.2.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Feb 10 2017 Fedora Release Engineering - 0.2.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 2298d5a..9adf3fa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -26be9b0c5a234f1afe7d83d02a4a33f4 gpicview-0.2.5.tar.xz +SHA512 (gpicview-20250329T1449.tar.gz) = 132431b189f25bbfa8f7fae30caf263ca2adc0a0959b6ccf0e36e2bec58987585946ffd667c758eefd111315c0b59dd822f630d935a67811105cc4b71b3f9b3b