Backport various fixes from master to 1.2.5
Use bare repository directly
This commit is contained in:
parent
ed6d8bc9db
commit
0b7d307bb0
|
@ -38,3 +38,4 @@ libfm-0.1.12.tar.gz
|
|||
/libfm-1.2.4-D20161206gita24389f804ae95f737bbb4239be00bc99a62180b.tar.gz
|
||||
/libfm-1.2.4-D20161209gitab583d7800bbc308f2852384f87c2357f49b01cd.tar.gz
|
||||
/libfm-1.2.5.tar.xz
|
||||
/libfm-20171230T1949.tar.gz
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
REPONAME=libfm
|
||||
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
|
||||
tar czf ${TARNAME} ${REPONAME}.git/
|
||||
|
||||
cp -p ${TARNAME} $PWDDIR
|
||||
popd
|
||||
rm -rf $TMPDIR
|
122
libfm.spec
122
libfm.spec
|
@ -3,40 +3,67 @@
|
|||
# Upstream git:
|
||||
# git://pcmanfm.git.sourceforge.net/gitroot/pcmanfm/libfm
|
||||
# add bootstrap, need to build menu-cache in epel7
|
||||
%global userelease 0
|
||||
%global usegit 0
|
||||
%global usegitbare 1
|
||||
|
||||
%if 0%{?usegit} < 1
|
||||
%if 0%{?usegitbare} < 1
|
||||
# force
|
||||
%global userelease 1
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%global bootstrap 0
|
||||
%global mainver 1.2.5
|
||||
%undefine prever
|
||||
%global prerpmver %(echo "%{?prever}" | sed -e 's|-||g')
|
||||
|
||||
%global usegit 0
|
||||
%global mainrel 3.100
|
||||
%global mainrel 4
|
||||
|
||||
%if 0%{?usegit} >= 1
|
||||
%global githash ab583d7800bbc308f2852384f87c2357f49b01cd
|
||||
%global shorthash %(TMP=%githash ; echo ${TMP:0:10})
|
||||
%global gitdate Fri, 9 Dec 2016 01:44:54 +0200
|
||||
%global gitdate_num 20161209
|
||||
%endif
|
||||
|
||||
%if 0%{?usegitbare} >= 1
|
||||
%global gitbaredate 20171230
|
||||
%global gitbaretime 1949
|
||||
%endif
|
||||
|
||||
%if 0%{?userelease} >= 1
|
||||
%global fedorarel %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}}
|
||||
%endif
|
||||
%if 0%{?usegit} >= 1
|
||||
%global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash}
|
||||
%else
|
||||
%global fedorarel %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}}
|
||||
%endif
|
||||
%if 0%{?usegitbare} >= 1
|
||||
%global fedorarel %{mainrel}.gitD%{gitbaredate}
|
||||
%endif
|
||||
|
||||
%global build_doc 1
|
||||
|
||||
Name: libfm
|
||||
Version: %{mainver}
|
||||
Release: %{fedorarel}%{?dist}.2
|
||||
Release: %{fedorarel}%{?dist}
|
||||
Summary: GIO-based library for file manager-like programs
|
||||
|
||||
Group: System Environment/Libraries
|
||||
License: GPLv2+
|
||||
URL: http://pcmanfm.sourceforge.net/
|
||||
%if 0%{?usegit} >= 1
|
||||
Source0: https://github.com/lxde/libfm/archive/%{githash}/%{name}-%{version}-D%{gitdate_num}git%{githash}.tar.gz
|
||||
%else
|
||||
%if 0%{?userelease} >= 1
|
||||
Source0: http://downloads.sourceforge.net/pcmanfm/%{name}-%{mainver}%{?prever}.tar.xz
|
||||
Source1: https://raw.githubusercontent.com/lxde/libfm/master/autogen.sh
|
||||
%endif
|
||||
%if 0%{?usegit} >= 1
|
||||
Source0: https://github.com/lxde/libfm/archive/%{githash}/%{name}-%{version}-D%{gitdate_num}git%{githash}.tar.gz
|
||||
%endif
|
||||
%if 0%{?usegitbare} >= 1
|
||||
Source0: libfm-%{gitbaredate}T%{gitbaretime}.tar.gz
|
||||
%endif
|
||||
Source10: create-libfm-git-bare-tarball.sh
|
||||
|
||||
#
|
||||
# https://github.com/lxde/libfm/pull/11
|
||||
|
@ -79,6 +106,10 @@ BuildRequires: vala
|
|||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
|
||||
%if 0%{?usegitbare} >= 1
|
||||
BuildRequires: git
|
||||
%endif
|
||||
|
||||
%if 0%{?build_doc} < 1
|
||||
Obsoletes: %{name}-devel-docs < 0.1.15
|
||||
%endif
|
||||
|
@ -190,20 +221,54 @@ This package containg development documentation files for %{name}.
|
|||
|
||||
|
||||
%prep
|
||||
%if 0%{?usegit} < 1
|
||||
%if 0%{?userelease} >= 1
|
||||
%setup -q -n %{name}-%{version}%{?prever}
|
||||
cp -a %{SOURCE1} .
|
||||
#%%patch0 -p1 -b .orig
|
||||
%else
|
||||
%endif
|
||||
%if 0%{?usegit} >= 1
|
||||
%setup -q -n %{name}-%{githash}
|
||||
%endif
|
||||
|
||||
%if 0%{?usegitbare} < 1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%endif
|
||||
|
||||
%if 0%{?usegitbare} >= 1
|
||||
%setup -q -c -T -a 0
|
||||
git clone ./libfm.git/
|
||||
cd libfm
|
||||
cp -a [A-Z]* ..
|
||||
|
||||
git config user.name "libfm Fedora maintainer"
|
||||
git config user.email "libfm-maintainer@fedoraproject.org"
|
||||
|
||||
git checkout -b 1.2.5-fedora 1.2.5
|
||||
cat > GITHASH <<EOF
|
||||
5d03c2d8dc5570e31d5a65c3b8fac97d5755fd36
|
||||
b072ee0400432d72fdf86ba9fed74a7e0ec11ec1
|
||||
b5d9766e075af84c1d69c927efcf25b64133dbfc
|
||||
7831e2990e8e945a2cafc7b7183a37cf85733a64
|
||||
08e84d222fbec91a3d3993cece093a2d884e8ec9
|
||||
569aa07ab01c057bf2d5bdaabd5bbfd9f4b7e15f
|
||||
b1ddf2a0c0d8746e35ed90ea89266fe80c06797a
|
||||
7ef910dd9e4a94c25e9bb14b39e9f6fd003d8ca7
|
||||
EOF
|
||||
|
||||
cat GITHASH | while read line
|
||||
do
|
||||
git cherry-pick $line
|
||||
done
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 22
|
||||
%patch1000 -p1
|
||||
%endif
|
||||
%if 0%{?usegitbare} >= 1
|
||||
git commit -m "Use gtk version specific module directory" -a
|
||||
%endif
|
||||
|
||||
# Patch1000 needs below anyway
|
||||
sh autogen.sh
|
||||
|
@ -214,6 +279,18 @@ sed -i.libdir_syssearch \
|
|||
configure
|
||||
|
||||
%build
|
||||
%if 0%{?usegitbare} >= 1
|
||||
cd libfm
|
||||
%endif
|
||||
|
||||
%if (0%{?usegitbare} >= 1) || (0%{?usegit} >= 1)
|
||||
# Workaround
|
||||
# Once generate files anyway
|
||||
./configure
|
||||
make dist
|
||||
rm -f config.status
|
||||
%endif
|
||||
|
||||
for ver in \
|
||||
%if 0%{?fedora} >= 22
|
||||
2 \
|
||||
|
@ -249,6 +326,12 @@ do
|
|||
done
|
||||
|
||||
%install
|
||||
TOPDIR=$(pwd)
|
||||
|
||||
%if 0%{?usegitbare} >= 1
|
||||
cd libfm
|
||||
%endif
|
||||
|
||||
# GTK3
|
||||
cp -a INSTDIR-gtk3/* $RPM_BUILD_ROOT
|
||||
|
||||
|
@ -257,11 +340,14 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libfm-gtk.pc
|
|||
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
||||
%if ! 0%{?bootstrap}
|
||||
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
|
||||
(
|
||||
cd $TOPDIR
|
||||
%find_lang %{name}
|
||||
)
|
||||
%endif
|
||||
|
||||
echo '%%defattr(-,root,root,-)' > base-header.files
|
||||
echo '%%defattr(-,root,root,-)' > gtk-header.files
|
||||
echo '%%defattr(-,root,root,-)' > $TOPDIR/base-header.files
|
||||
echo '%%defattr(-,root,root,-)' > $TOPDIR/gtk-header.files
|
||||
|
||||
for f in $RPM_BUILD_ROOT%_includedir/%name-1.0/*.h
|
||||
do
|
||||
|
@ -270,14 +356,14 @@ do
|
|||
do
|
||||
if [ -f src/$dir/$bf ]
|
||||
then
|
||||
echo %_includedir/%name-1.0/$bf >> base-header.files
|
||||
echo %_includedir/%name-1.0/$bf >> $TOPDIR/base-header.files
|
||||
fi
|
||||
done
|
||||
for dir in gtk
|
||||
do
|
||||
if [ -f src/$dir/$bf ]
|
||||
then
|
||||
echo %_includedir/%name-1.0/$bf >> gtk-header.files
|
||||
echo %_includedir/%name-1.0/$bf >> $TOPDIR/gtk-header.files
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
@ -305,6 +391,10 @@ popd
|
|||
/usr/lib/rpm/check-rpaths
|
||||
|
||||
%check
|
||||
%if 0%{?usegitbare} >= 1
|
||||
cd libfm
|
||||
%endif
|
||||
|
||||
find INSTDIR-gtk* -name \*.ui >> po/POTFILES.skip
|
||||
for ver in \
|
||||
%if 0%{?fedora} >= 22
|
||||
|
@ -423,6 +513,10 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Dec 30 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.2.5-4.gitD20171230
|
||||
- Backport various fixes from master to 1.2.5
|
||||
- Use bare repository directly
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-3.100.2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue