-
Notifications
You must be signed in to change notification settings - Fork 55
/
maitreya8.spec
126 lines (98 loc) · 2.95 KB
/
maitreya8.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
%define dir_name maitreya8
%define font_dir %{_datadir}/fonts/truetype
%if 0%{?suse_version} >= 1140
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
%endif
Name: maitreya8
Version: 8.1
Release: 1%{?dist}
Summary: Software for Vedic and western astrology
Group: Productivity/Other
License: GPLv2+
URL: http://www.saravali.de
Source0: https://github.com/martin-pe/maitreya8/releases/download/%{version}/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
#opensuse 11.4 and better wants wxWidgets-wxcontainer-devel all others wxGTK-devel
#changed 20150306 martin: wxWidgets-wxcontainer-devel replaced by wxWidgets-devel
%if 0%{?suse_version} >= 1140
BuildRequires: wxWidgets-devel
%else
BuildRequires: wxGTK-devel
%endif
#let build system find dependancies.
#Requires: wxGTK,wxBase
#mandrivia needs libfontconfig
%if 0%{?mdkversion}
BuildRequires: libfontconfig-devel
BuildRequires: libfontconfig
%endif
#to verifiy desktop file.
BuildRequires: desktop-file-utils
#suse checks for dups and the desktop file
%if 0%{?suse_version} || 0%{?sles_version}
BuildRequires: fdupes
BuildRequires: update-desktop-files
#suse is a lang package which must be recommended.
Recommends: %{name}-lang = %{version}
%lang_package
%endif
%description
Free software for western and Vedic astrology (Jyotish). Supports classical
Vedic astrology, KP system and parts of Jaimini system. Western part
includes Uranian astrology. Platforms: Win32, Linux and UNIX.
#normal setup
%prep
%setup -q
%build
#autoreconf needed because of reorder patch.
autoreconf -fi
%configure
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
#find lang is needed because of reasons in
#http://fedoraproject.org/wiki/Packaging/Guidelines#Why_do_we_need_to_use_.25find_lang.3F
%find_lang %{dir_name}
%if 0%{?suse_version} || 0%{?sles_version}
# check desktop fits suse specs
%suse_update_desktop_file %{dir_name}
%endif
#check the desktop file.
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{dir_name}.desktop
%if 0%{?suse_version} || 0%{?sles_version}
#if suse do fdupes to detect duplicates.
%fdupes -s %{buildroot}
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{?suse_version} || 0%{?sles_version}
#if suse reconfigure for fonts.
%post
%run_permissions
%run_suseconfig_fonts
%postun
%run_suseconfig_fonts
%files
%else
%files -f %{dir_name}.lang
%endif
%defattr(-,root,root,-)
%doc COPYING README NEWS INSTALL AUTHORS ChangeLog
%{_bindir}/%{name}8t
%{_bindir}/%{dir_name}
%{_bindir}/%{dir_name}.bin
%{_datadir}/applications/%{dir_name}.desktop
%if 0%{?suse_version} || 0%{?sles_version}
%dir %{font_dir}
%endif
%dir %{font_dir}/%{name}
%{font_dir}/%{name}/Saravali.ttf
%{_datadir}/%{dir_name}
%{_datadir}/pixmaps/maitreya8.png
%if 0%{?suse_version} || 0%{?sles_version}
%files lang -f %{dir_name}.lang
%defattr(-,root,root,-)
%endif
%changelog