File discourse-plugin-topic-preview.spec of Package discourse-plugin-topic-preview
#
# spec file for package discourse-plugin-math
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%define app_dir /srv/www/vhosts/discourse
%define plugin_dir %{app_dir}/plugins
%define plugin_name discourse-topic-previews
Name: discourse-plugin-topic-previews
Version: 0
Release: 0
Summary: Topic List Preview
License: MIT
Group: Internal
Url: https://meta.discourse.org/t/topic-list-previews/101646
Source: %{plugin_name}-%{version}.tar.xz
BuildArch: noarch
BuildRequires: rsync
BuildRequires: discourse
%requires_ge discourse
%description
Topic List Previews allows you to:
* Add images, excerpts, buttons and topic stats to topic list items; and
* Change the layout and style of topic list items
* Add ‘Featured’ topics above topic lists and topics.
These settings can be applied to all or selected topic lists on a site-wide or category-specific basis.
This flexible feature-set allows you create a variety of different topic list styles, including
%prep
%setup -q -n %{plugin_name}-%{version}
%build
chmod -R u=rwX,g=rX,o= .
chmod -R u=rwX,g=rX,o=X .
%install
install -D -d -m 0751 %{buildroot}%{plugin_dir}/%{plugin_name}/
rsync -av $PWD/ %{buildroot}%{plugin_dir}/%{plugin_name}/
%postun
touch %{app_dir}/tmp/rebuild.txt
%service_del_postun discourse-update.service
%files
%attr(-,root,discourse) %{plugin_dir}/%{plugin_name}/
%changelog