114 Star 1 Fork 19

src-openEuler/fakeroot
关闭

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fakeroot.spec 5.68 KB
一键复制 编辑 原始数据 按行查看 历史
wk333 提交于 2025-08-27 09:45 +08:00 . Corrected license format
%bcond_without autoconf
Summary: Gives a fake root environment
Name: fakeroot
Version: 1.37.1.2
Release: 2
License: GPL-3.0-or-later AND LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl)
URL: https://tracker.debian.org/pkg/fakeroot
Source0: https://ftp.debian.org/debian/pool/main/f/fakeroot/%{name}_%{version}.orig.tar.gz
Patch1: debian_fix-shell-in-fakeroot.patch
Patch2: fakeroot-multilib.patch
Patch3: fakeroot-drop-tartest.patch
Patch5001: fakeroot-upstream-1.25.2-sw.patch
%if %{with autoconf}
BuildRequires: autoconf automake libtool po4a
%endif
BuildRequires: /usr/bin/getopt libacl-devel libcap-devel sharutils make gcc
Requires: /usr/bin/getopt fakeroot-libs = %{version}-%{release}
Requires(post): /usr/sbin/alternatives
Requires(post): /usr/bin/readlink
Requires(preun): /usr/sbin/alternatives
%description
fakeroot runs a command in an environment wherein it appears to have
root privileges for file manipulation. fakeroot works by replacing the
file manipulation library functions (chmod(2), stat(2) etc.) by ones
that simulate the effect the real library functions would have had,
had the user really been root.
%package libs
Summary: Gives a fake root environment (libraries)
%description libs
This package contains the libraries required by %{name}.
%prep
%autosetup -p1 -n %{name}-%{version}
%build
%if %{with autoconf}
./bootstrap
pushd doc
po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg
popd
%endif
for file in ./doc/{*.1,*/*.1}; do
iconv -f latin1 -t utf8 < $file > $file.new && \
mv -f $file.new $file
done
for type in sysv tcp; do
mkdir obj-$type
cd obj-$type
cat >> configure << 'EOF'
exec ../configure "$@"
EOF
chmod +x configure
%configure \
--disable-dependency-tracking \
--disable-static \
--libdir=%{_libdir}/libfakeroot \
--with-ipc=$type \
--program-suffix=-$type
make
cd ..
done
%install
for type in sysv tcp; do
make -C obj-$type install libdir=%{_libdir}/libfakeroot DESTDIR=%{buildroot}
mv %{buildroot}%{_libdir}/libfakeroot/libfakeroot-0.so \
%{buildroot}%{_libdir}/libfakeroot/libfakeroot-$type.so
rm -f %{buildroot}%{_libdir}/libfakeroot/libfakeroot.so
rm -f %{buildroot}%{_libdir}/libfakeroot/libfakeroot.*la
%find_lang faked-$type --without-mo --with-man
%find_lang fakeroot-$type --without-mo --with-man
done
rm %{buildroot}%{_mandir}{,/*}/man1/fake{d,root}-sysv.1
rename -- -tcp '' %{buildroot}%{_mandir}{,/*}/man1/fake{d,root}-tcp.1
sed -e 's/-tcp//g' fake{d,root}-tcp.lang > fakeroot.lang
%check
for type in sysv tcp; do
make -C obj-$type check VERBOSE=1
done
%post
link=$(readlink -e "/usr/bin/fakeroot")
if [ "$link" = "/usr/bin/fakeroot" ]; then
rm -f /usr/bin/fakeroot
fi
link=$(readlink -e "%{_bindir}/faked")
if [ "$link" = "%{_bindir}/faked" ]; then
rm -f "%{_bindir}/faked"
fi
link=$(readlink -e "%{_libdir}/libfakeroot/libfakeroot-0.so")
if [ "$link" = "%{_libdir}/libfakeroot/libfakeroot-0.so" ]; then
rm -f "%{_libdir}/libfakeroot/libfakeroot-0.so"
fi
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot \
"%{_bindir}/fakeroot-tcp" 50 \
--slave %{_bindir}/faked faked %{_bindir}/faked-tcp \
--slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-tcp.so
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot \
"%{_bindir}/fakeroot-sysv" 40 \
--slave %{_bindir}/faked faked %{_bindir}/faked-sysv \
--slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-sysv.so \
%preun
if [ $1 = 0 ]; then
/usr/sbin/alternatives --remove fakeroot "%{_bindir}/fakeroot-tcp"
/usr/sbin/alternatives --remove fakeroot "%{_bindir}/fakeroot-sysv"
fi
%files -f %{name}.lang
%license COPYING
%doc AUTHORS BUGS DEBUG doc/README.saving
%{_bindir}/faked-*
%ghost %{_bindir}/faked
%{_bindir}/fakeroot-*
%ghost %{_bindir}/fakeroot
%{_mandir}/man1/faked.1*
%{_mandir}/man1/fakeroot.1*
%files libs
%dir %{_libdir}/libfakeroot
%{_libdir}/libfakeroot/libfakeroot-sysv.so
%{_libdir}/libfakeroot/libfakeroot-tcp.so
%ghost %{_libdir}/libfakeroot/libfakeroot-0.so
%changelog
* Wed Aug 27 2025 wangkai <13474090681@163.com> - 1.37.1.2-2
- Corrected license format
* Tue May 13 2025 Funda Wang <fundawang@yeah.net> - 1.37.1.2-1
- update to 1.37.1.2
* Wed Apr 02 2025 yaoxin <1024769339@qq.com> - 1.37.1-1
- Update to 1.37.1:
* Fix build with gcc-14.
* Fix FTBFS on armel, armhf, by undefining the t64 flags in communicate.h
Upload to experimental, for additional testing.
* Fix wrappers for fstatat64 et al missing.
* faked now ignores SIGWINCH.
* Patch from Samuel Thibault to add renameat2 support.
* Wed Dec 04 2024 yangzhenyu <dev11101@linx-info.com> - 1.32.2-2
- remove the architecture judgment in the patches section;
- include all patches in the source package.
* Wed Dec 27 2023 liyanan <liyanan61@h-partners.com> - 1.32.2-1
- Update to 1.32.2
* Wed Jun 14 2023 liyanan <thistleslyn@163.com> - 1.31-1
- Update to 1.31
* Sat Nov 12 2022 hua <dchang@zhixundn.com> 1.30.1-1
- update to 1.30.1
* Wed Oct 19 2022 wuzx<wuzx1226@qq.com> - 1.25.2-4
- add sw64 patch
* Tue Jun 21 2022 liyanan <liyanan32@h-partners.com> - 1.25.2-3
- Skip tar test: the test is unstable and keeps on randomly failing
* Sat Mar 13 2021 shixuantong <shixuantong@huawei.com> - 1.25.2-2
- Fix error: '_STAT_VER' undeclared
* Fri Nov 20 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.25.2-1
- Update to 1.25.2
* Wed Aug 12 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.23-3
- remove four test cases to solve the compilation failure
* Fri Nov 29 2019 lihao <lihao129@huawei.com> - 1.23-2
- Package Init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/fakeroot.git
git@gitee.com:src-openeuler/fakeroot.git
src-openeuler
fakeroot
fakeroot
master

搜索帮助