Compare commits
10 Commits
11a58f188a
...
a78a25233a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a78a25233a | ||
|
|
3d7f4fdd77 | ||
|
|
18e3cfc44c | ||
|
|
80995fc7d1 | ||
|
|
54aa01867c | ||
|
|
7259deaafa | ||
|
|
1715e564e8 | ||
|
|
6612416dbb | ||
|
|
6c7fc41029 | ||
|
|
2856ce92bf |
25
0001-add-compile-option.patch
Normal file
25
0001-add-compile-option.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From b67c8c1b249046b92966b0ad7768c07cbad59445 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangchao13 <chaozhangm@isoftstone.com>
|
||||||
|
Date: Thu, 6 Apr 2023 14:48:07 +0800
|
||||||
|
Subject: [PATCH] fix
|
||||||
|
|
||||||
|
---
|
||||||
|
configure | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index 5cf4e08..b8566dd 100644
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -42,7 +42,7 @@ OSNAME=
|
||||||
|
UTF8_LOCALE=
|
||||||
|
|
||||||
|
AR=ar
|
||||||
|
-CC=cc
|
||||||
|
+CC=$CC
|
||||||
|
CFLAGS=
|
||||||
|
FATAL=0
|
||||||
|
LDADD=
|
||||||
|
--
|
||||||
|
2.39.2.windows.1
|
||||||
|
|
||||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
|||||||
# mandoc
|
|
||||||
|
|
||||||
#### Description
|
|
||||||
A suite of tools for compiling mdoc and man
|
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create Feat_xxx branch
|
|
||||||
3. Commit your code
|
|
||||||
4. Create Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
|||||||
# mandoc
|
|
||||||
|
|
||||||
#### 介绍
|
|
||||||
A suite of tools for compiling mdoc and man
|
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
|
||||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
BIN
mandoc-1.14.6.tar.gz
Normal file
BIN
mandoc-1.14.6.tar.gz
Normal file
Binary file not shown.
190
mandoc.spec
Normal file
190
mandoc.spec
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
Name: mandoc
|
||||||
|
Version: 1.14.6
|
||||||
|
Release: 5
|
||||||
|
Summary: A suite of tools for compiling mdoc and man
|
||||||
|
|
||||||
|
License: ISC
|
||||||
|
URL: https://mandoc.bsd.lv/
|
||||||
|
Source0: https://mandoc.bsd.lv/snapshots/mandoc-%{version}.tar.gz
|
||||||
|
Patch0: 0001-add-compile-option.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: clang
|
||||||
|
BuildRequires: zlib-devel
|
||||||
|
|
||||||
|
# requirements for %%check
|
||||||
|
BuildRequires: perl-interpreter
|
||||||
|
BuildRequires: perl(IPC::Open3)
|
||||||
|
|
||||||
|
Requires(post): %{_sbindir}/update-alternatives
|
||||||
|
Requires(postun): %{_sbindir}/update-alternatives
|
||||||
|
Requires(preun): %{_sbindir}/update-alternatives
|
||||||
|
|
||||||
|
# The shared library package has been removed per discussion with the
|
||||||
|
# upstream maintainer. If using the library, the static library is
|
||||||
|
# preferred because the API is not stable.
|
||||||
|
Provides: libmandoc = %{version}-%{release}
|
||||||
|
Obsoletes: libmandoc <= 1.14.5-10
|
||||||
|
|
||||||
|
%description
|
||||||
|
mandoc is a suite of tools compiling mdoc, the roff macro language of choice
|
||||||
|
for BSD manual pages, and man, the predominant historical language for UNIX
|
||||||
|
manuals. It is small, ISO C, ISC-licensed, and quite fast. The main component
|
||||||
|
of the toolset is the mandoc utility program, based on the libmandoc validating
|
||||||
|
compiler, to format output for UTF-8 and ASCII UNIX terminals, HTML 5,
|
||||||
|
PostScript, and PDF.
|
||||||
|
|
||||||
|
%package -n libmandoc-devel
|
||||||
|
Summary: Development libraries and headers for libmandoc
|
||||||
|
|
||||||
|
%description -n libmandoc-devel
|
||||||
|
The mandoc library parses a UNIX manual into an abstract syntax tree (AST).
|
||||||
|
UNIX manuals are composed of mdoc(7) or man(7), and may be mixed with roff(7),
|
||||||
|
tbl(7), and eqn(7) invocations.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
# NB: not an autoconf script
|
||||||
|
# settings are read in through configure.local
|
||||||
|
echo 'PREFIX=%{_prefix}' > configure.local
|
||||||
|
echo 'BINDIR=%{_bindir}' >> configure.local
|
||||||
|
echo 'SBINDIR=%{_sbindir}' >> configure.local
|
||||||
|
echo 'MANDIR=%{_mandir}' >> configure.local
|
||||||
|
echo 'INCLUDEDIR=%{_includedir}' >> configure.local
|
||||||
|
echo 'LIBDIR=%{_libdir}' >> configure.local
|
||||||
|
|
||||||
|
# with default settings rpmlint complains about cross-directory hardlinks
|
||||||
|
echo 'LN="ln -sf"' >> configure.local
|
||||||
|
|
||||||
|
echo 'MANM_MANCONF=mandoc.conf' >> configure.local
|
||||||
|
|
||||||
|
# override the install permissions so that owner-write bits are set,
|
||||||
|
# so rpmbuild can do whatever modifications it does post-%%install
|
||||||
|
echo 'INSTALL_PROGRAM="${INSTALL} -m 0755"' >> configure.local
|
||||||
|
echo 'INSTALL_LIB="${INSTALL} -m 0755"' >> configure.local
|
||||||
|
echo 'INSTALL_MAN="${INSTALL} -m 0644"' >> configure.local
|
||||||
|
echo 'INSTALL_DATA="${INSTALL} -m 0644"' >> configure.local
|
||||||
|
|
||||||
|
echo 'INSTALL_LIBMANDOC=1' >> configure.local
|
||||||
|
|
||||||
|
%ifarch riscv64
|
||||||
|
echo 'CFLAGS="%{optflags} -fPIC -Werror=implicit-function-declaration"' >> configure.local
|
||||||
|
%else
|
||||||
|
echo 'CFLAGS="%{optflags} -fPIC"' >> configure.local
|
||||||
|
%endif
|
||||||
|
export CC=clang
|
||||||
|
./configure
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
# Ensure headers do not have the execute bit set
|
||||||
|
chmod -x %{buildroot}%{_includedir}/*.h
|
||||||
|
|
||||||
|
# rename files for alternative usage
|
||||||
|
for f in man apropos whatis soelim; do
|
||||||
|
# Rename binary executables
|
||||||
|
mv %{buildroot}%{_bindir}/$f %{buildroot}%{_bindir}/$f.%{name}
|
||||||
|
|
||||||
|
# Rename corresponding man pages
|
||||||
|
mv %{buildroot}%{_mandir}/man1/$f.1 %{buildroot}%{_mandir}/man1/$f.%{name}.1
|
||||||
|
done
|
||||||
|
|
||||||
|
%check
|
||||||
|
env LD_LIBRARY_PATH="$PWD" %make_build regress
|
||||||
|
|
||||||
|
%pre
|
||||||
|
for f in man apropos whatis; do
|
||||||
|
[ -L %{_bindir}/$f ] || %{__rm} -f %{_bindir}/$f >/dev/null 2>&1 || :
|
||||||
|
[ -L %{_mandir}/man1/$f.1.gz ] || %{__rm} -f %{_mandir}/man1/$f.1.gz >/dev/null 2>&1 || :
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -e /usr/lib/systemd/system/mandb.timer ]; then
|
||||||
|
if test -d /run/systemd; then
|
||||||
|
systemctl stop man-db.timer >/dev/null 2>&1 || :
|
||||||
|
systemctl -q disable man-db.timer >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
%{_sbindir}/update-alternatives --remove man %{_bindir}/man.%{name} >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
%post
|
||||||
|
# set up the alternatives files
|
||||||
|
%{_sbindir}/update-alternatives --install %{_bindir}/man man %{_bindir}/man.%{name} 300 \
|
||||||
|
--slave %{_bindir}/apropos apropos %{_bindir}/apropos.%{name} \
|
||||||
|
--slave %{_bindir}/whatis whatis %{_bindir}/whatis.%{name} \
|
||||||
|
--slave %{_mandir}/man1/man.1.gz man.1.gz %{_mandir}/man1/man.%{name}.1.gz \
|
||||||
|
--slave %{_mandir}/man1/apropos.1.gz apropos.1.gz %{_mandir}/man1/apropos.%{name}.1.gz \
|
||||||
|
--slave %{_mandir}/man1/whatis.1.gz whatis.1.gz %{_mandir}/man1/whatis.%{name}.1.gz \
|
||||||
|
--slave %{_mandir}/man1/soelim.1.gz soelim.1.gz %{_mandir}/man1/soelim.%{name}.1.gz \
|
||||||
|
>/dev/null 2>&1 || :
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%{_bindir}/demandoc
|
||||||
|
%{_bindir}/mandoc
|
||||||
|
%ghost %{_bindir}/apropos
|
||||||
|
%{_bindir}/apropos.%{name}
|
||||||
|
%ghost %{_bindir}/man
|
||||||
|
%{_bindir}/man.%{name}
|
||||||
|
%ghost %{_bindir}/soelim
|
||||||
|
%{_bindir}/soelim.%{name}
|
||||||
|
%ghost %{_bindir}/whatis
|
||||||
|
%{_bindir}/whatis.%{name}
|
||||||
|
%{_sbindir}/makewhatis
|
||||||
|
%{_mandir}/man1/demandoc.1.gz
|
||||||
|
%{_mandir}/man1/mandoc.1.gz
|
||||||
|
%ghost %{_mandir}/man1/soelim.1*
|
||||||
|
%{_mandir}/man1/soelim.%{name}.*
|
||||||
|
%{_mandir}/man1/man.%{name}.1*
|
||||||
|
%{_mandir}/man1/apropos.%{name}.1*
|
||||||
|
%{_mandir}/man1/whatis.%{name}.1*
|
||||||
|
%{_mandir}/man5/mandoc.conf.5.gz
|
||||||
|
%{_mandir}/man5/mandoc.db.5.gz
|
||||||
|
%{_mandir}/man7/eqn.7.gz
|
||||||
|
%{_mandir}/man7/mandoc_char.7.gz
|
||||||
|
%{_mandir}/man7/man.7.gz
|
||||||
|
%{_mandir}/man7/mdoc.7.gz
|
||||||
|
%{_mandir}/man7/roff.7.gz
|
||||||
|
%{_mandir}/man7/tbl.7.gz
|
||||||
|
%{_mandir}/man8/makewhatis.8.gz
|
||||||
|
|
||||||
|
%files -n libmandoc-devel
|
||||||
|
%license LICENSE
|
||||||
|
%{_libdir}/libmandoc.a
|
||||||
|
%{_includedir}/eqn.h
|
||||||
|
%{_includedir}/man.h
|
||||||
|
%{_includedir}/mandoc.h
|
||||||
|
%{_includedir}/mandoc_aux.h
|
||||||
|
%{_includedir}/mandoc_parse.h
|
||||||
|
%{_includedir}/mdoc.h
|
||||||
|
%{_includedir}/roff.h
|
||||||
|
%{_includedir}/tbl.h
|
||||||
|
%{_mandir}/man3/mandoc.3*
|
||||||
|
%{_mandir}/man3/mandoc_escape.3*
|
||||||
|
%{_mandir}/man3/mandoc_malloc.3*
|
||||||
|
%{_mandir}/man3/mansearch.3*
|
||||||
|
%{_mandir}/man3/mchars_alloc.3*
|
||||||
|
%{_mandir}/man3/tbl.3*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Apr 22 2024 lilong <lilong@kylinos.cn> - 1.14.6-5
|
||||||
|
- Fix low-level dependency compilation failure
|
||||||
|
|
||||||
|
* Mon Apr 15 2024 lilong <lilong@kylinos.cn> - 1.14.6-4
|
||||||
|
- Fix crash when mandoc install
|
||||||
|
|
||||||
|
* Mon Oct 9 2023 laokz <zhangkai@iscas.ac.cn> - 1.14.6-3
|
||||||
|
- add CFLAGS for riscv64 to workaround fragile test-strptime.c
|
||||||
|
* Thu Apr 6 2023 changzhangm <chaozhangm@isoftstone.com> - 1.14.6-2
|
||||||
|
- Update to 1.14.6-2
|
||||||
|
* Fri Sep 23 2022 chendexi <chendexi@kylinos.cn> - 1.14.6-1
|
||||||
|
- Initial package
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user