Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Psheng
typora
typora.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File typora.spec of Package typora
# # spec file for package typora # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define electron_version electron21 %if "%{?_target_cpu}" == "x86_64" %define arch_type x64 %endif %if "%{?_target_cpu}" == "aarch64" %define arch_type arm64 %endif Name: typora Version: 1.8.10 Release: 0 Group: Productivity/Text/Editors Summary: A markdown text editor and reader # FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses License: SUSE-NonFree URL: https://typora.io Source0: https://download.typora.io/linux/Typora-linux-%{arch_type}.tar.gz Source1: typora.rpmlintrc BuildRequires: systemd-rpm-macros Requires: %{electron_version} %description Typora gives you a seamless experience as both a reader and a writer. It removes the preview window, mode switcher, syntax symbols of markdown source code, and all other unnecessary distractions. Instead, it provides a real live preview feature to help you concentrate on the content itself. %prep %setup -q -n bin %build %install # bin cat > %{name} <<EOF #!/bin/bash ELECTRON_FORCE_IS_PACKAGED=true "/usr/bin/electron" "%{_datadir}/%{name}/app.asar" --no-sandbox "\$@" EOF # desktop cat > %{name}.desktop <<EOF [Desktop Entry] Terminal=false Name=Typora Comment=A markdown text editor and reader Comment[zh_CN]=Markdown 文本编辑器和阅读器 GenericName=Markdown Editor GenericName[zh_CN]=Markdown 编辑器 Exec=typora %U Icon=typora Type=Application StartupNotify=true Categories=Office;WordProcessor; MimeType=text/markdown;text/x-markdown; EOF install -Dm 755 %{name} %{buildroot}/%{_bindir}/%{name} install -Dm 755 %{name}.desktop %{buildroot}/%{_datadir}/applications/%{name}.desktop for size in 16 32 128 256 512; do install -Dm 644 Typora-linux-%{arch_type}/resources/assets/icon/icon_${size}x${size}.png \ %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/%{name}.png SIZE_X2=$[size*2] install -Dm 644 Typora-linux-%{arch_type}/resources/assets/icon/icon_${size}x${size}@2x.png \ %{buildroot}%{_datadir}/icons/hicolor/${SIZE_X2}x${SIZE_X2}/apps/%{name}.png done cp -r Typora-linux-%{arch_type}/resources %{buildroot}%{_datadir}/%{name} %files %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/* %dir %{_datadir}/%{name} %{_datadir}/%{name}/* %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor