]> git.pld-linux.org Git - packages/ngspice.git/blob - ngspice.spec
92993a9a82b2b6149ec53552579a4cb07c5d1159
[packages/ngspice.git] / ngspice.spec
1 # Conditional build:
2 %bcond_without  shared  # build as shared library
3
4 Summary:        Ngspice circuit simulator
5 Summary(pl.UTF-8):      Ngspice symulator obwodów
6 Name:           ngspice
7 Version:        35
8 Release:        1
9 License:        GPL
10 Group:          Applications
11 Source0:        https://sourceforge.net/projects/ngspice/files/ng-spice-rework/%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5:  be12f2a7ee5516b5509017c1bd3343e3
13 Source1:        %{name}.desktop
14 URL:            http://ngspice.sourceforge.net/
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 %description
18 Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is
19 based on three open source software packages: Spice3f5, Cider1b1 and
20 Xspice.
21
22 %description -l pl.UTF-8
23 Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is
24 based on three open source software packages: Spice3f5, Cider1b1 and
25 Xspice.
26
27 %package devel
28 Summary:        Header files for ngspice library
29 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki ngspice
30 License:        GPL
31 Group:          Development/Libraries
32 Requires:       %{name} = %{version}-%{release}
33
34 %description devel
35 Header files for ngspice library.
36
37 %description devel -l pl.UTF-8
38 Pliki nagłówkowe biblioteki ngspice.
39
40 %prep
41 %setup -q
42 find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
43
44 %build
45
46 %configure \
47         --disable-silent-rules \
48         --enable-xspice \
49         --enable-cider \
50         --enable-openmp \
51 %if %{with shared}
52         --with-ngshared
53 %else
54         --enable-xgraph \
55         --with-x \
56         --with-readline=yes
57 %endif
58
59 %{__make}
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63
64 %{__make} install \
65         DESTDIR=$RPM_BUILD_ROOT
66
67 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
68 install -d $RPM_BUILD_ROOT%{_desktopdir}
69
70 %if %{without shared}
71 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
72 %endif
73 cp -R examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %if %{with shared}
79 %post   -p /sbin/ldconfig
80 %postun -p /sbin/ldconfig
81 %endif
82
83 %files
84 %defattr(644,root,root,755)
85 %doc ANALYSES AUTHORS ChangeLog NEWS README
86 %dir %{_libdir}/ngspice
87 %attr(755,root,root) %{_libdir}/ngspice/*.cm
88 %{_examplesdir}/%{name}-%{version}
89 %{_datadir}/%{name}
90
91 %if %{without shared}
92 %attr(755,root,root) %{_bindir}/ngspice
93 %{_desktopdir}/%{name}.desktop
94 %{_mandir}/man1/ng*1*
95 %else
96 %attr(755,root,root) %{_libdir}/libngspice.so.0.0.*
97 %attr(755,root,root) %ghost %{_libdir}/libngspice.so.0
98 %endif
99
100 %files devel
101 %defattr(644,root,root,755)
102 %if %{with shared}
103 %{_libdir}/libngspice.so
104 %{_libdir}/libngspice.la
105 %{_pkgconfigdir}/*.pc
106 %{_includedir}/ngspice
107 %endif
This page took 0.065422 seconds and 2 git commands to generate.