1 | Name: ldview |
---|
2 | Version: 4.2b1.20140530 |
---|
3 | Release: ec1 |
---|
4 | Source0: ldview.tar.bz2 |
---|
5 | Patch1: ldview-1-no-force-zoomtofit.patch |
---|
6 | Patch2: ldview-2-typo.patch |
---|
7 | Patch3: ldview-3-64-bit-fix.patch |
---|
8 | Summary: Lego CAD viewer |
---|
9 | Group: Engineering/CAD |
---|
10 | License: GPL |
---|
11 | Vendor: Travis Cobbs <ldview@gmail.com> |
---|
12 | Packager: Peter Bartfai <pbartfai@stardust.hu> |
---|
13 | URL: http://ldview.sourceforge.net |
---|
14 | Buildroot: /tmp/%{name}-%{version}-root |
---|
15 | #Requires: ldraw_parts ldraw_parts-creativecommons |
---|
16 | BuildRequires: qt-devel, boost-devel, tinyxml-devel, gcc-c++, libpng-devel, gl2ps-devel, libjpeg-turbo-devel, mesa-libOSMesa-devel |
---|
17 | #, lib3ds-devel >= 2.0.0-rc1 ??? |
---|
18 | #, cvs |
---|
19 | |
---|
20 | %description |
---|
21 | LDView is a real-time 3D viewer for displaying LDraw models using hardware-accellerated 3D graphics. |
---|
22 | |
---|
23 | %prep |
---|
24 | %setup -n ldview |
---|
25 | %patch1 -p1 |
---|
26 | %patch2 -p1 |
---|
27 | %patch3 -p1 |
---|
28 | |
---|
29 | %build |
---|
30 | cd QT |
---|
31 | PATH=/usr/lib64/qt4/bin:$PATH # uic: File generated with too old version of Qt Designer |
---|
32 | #PATH=$PATH:/usr/lib/qt-3.3/bin |
---|
33 | #export QTDIR=/usr/lib/qt-3.3 |
---|
34 | qmake |
---|
35 | |
---|
36 | make |
---|
37 | strip LDView |
---|
38 | cd ../OSMesa |
---|
39 | make |
---|
40 | |
---|
41 | %install |
---|
42 | cd QT |
---|
43 | INSTALL_ROOT=$RPM_BUILD_ROOT make install |
---|
44 | |
---|
45 | #mkdir -p $RPM_BUILD_ROOT/usr/share/ldview |
---|
46 | #mkdir -p $RPM_BUILD_ROOT/usr/bin |
---|
47 | #install -d $RPM_BUILD_ROOT/usr/share/ldview |
---|
48 | #install -m 755 LDView $RPM_BUILD_ROOT/usr/bin/LDView |
---|
49 | #install -m 644 ../Textures/SansSerif.fnt \ |
---|
50 | #$RPM_BUILD_ROOT/usr/share/ldview/SansSerif.fnt |
---|
51 | #install -m 644 ../Help.html $RPM_BUILD_ROOT/usr/share/ldview/Help.html |
---|
52 | #install -m 644 ../Readme.txt $RPM_BUILD_ROOT/usr/share/ldview/Readme.txt |
---|
53 | #install -m 644 ../ChangeHistory.html $RPM_BUILD_ROOT/usr/share/ldview/ChangeHistory.html |
---|
54 | #install -m 644 ../license.txt $RPM_BUILD_ROOT/usr/share/ldview/license.txt |
---|
55 | #install -m 644 ../m6459.ldr $RPM_BUILD_ROOT/usr/share/ldview/m6459.ldr |
---|
56 | #install -m 644 ../8464.mpd $RPM_BUILD_ROOT/usr/share/ldview/8464.mpd |
---|
57 | #install -m 644 ../LDViewMessages.ini \ |
---|
58 | # $RPM_BUILD_ROOT/usr/share/ldview/LDViewMessages.ini |
---|
59 | #cat ../LDExporter/LDExportMessages.ini >> \ |
---|
60 | # $RPM_BUILD_ROOT/usr/share/ldview/LDViewMessages.ini |
---|
61 | #install -m 644 ../Translations/German/LDViewMessages.ini \ |
---|
62 | # $RPM_BUILD_ROOT/usr/share/ldview/LDViewMessages_de.ini |
---|
63 | #install -m 644 ../Translations/Italian/LDViewMessages.ini \ |
---|
64 | # $RPM_BUILD_ROOT/usr/share/ldview/LDViewMessages_it.ini |
---|
65 | #install -m 644 ../Translations/Czech/LDViewMessages.ini \ |
---|
66 | # $RPM_BUILD_ROOT/usr/share/ldview/LDViewMessages_cz.ini |
---|
67 | #install -m 644 ../Translations/Hungarian/LDViewMessages.ini \ |
---|
68 | # $RPM_BUILD_ROOT/usr/share/ldview/LDViewMessages_hu.ini |
---|
69 | #install -m 644 todo.txt $RPM_BUILD_ROOT/usr/share/ldview/todo.txt |
---|
70 | #install -m 644 ldview_en.qm $RPM_BUILD_ROOT/usr/share/ldview/ldview_en.qm |
---|
71 | #install -m 644 ldview_de.qm $RPM_BUILD_ROOT/usr/share/ldview/ldview_de.qm |
---|
72 | #install -m 644 ldview_it.qm $RPM_BUILD_ROOT/usr/share/ldview/ldview_it.qm |
---|
73 | #install -m 644 ldview_cz.qm $RPM_BUILD_ROOT/usr/share/ldview/ldview_cz.qm |
---|
74 | install -m 644 ../LDExporter/LGEO.xml \ |
---|
75 | $RPM_BUILD_ROOT/usr/share/ldview/LGEO.xml |
---|
76 | mkdir -p $RPM_BUILD_ROOT/usr/share/mime-info/ |
---|
77 | mkdir -p $RPM_BUILD_ROOT/usr/share/mime/packages/ |
---|
78 | mkdir -p $RPM_BUILD_ROOT/usr/share/application-registry/ |
---|
79 | mkdir -p $RPM_BUILD_ROOT/usr/share/applications/ |
---|
80 | mkdir -p $RPM_BUILD_ROOT/usr/bin |
---|
81 | mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/gnome-ldraw.png |
---|
82 | mkdir -p $RPM_BUILD_ROOT/usr/share/icons/gnome/32x32/mimetypes |
---|
83 | mkdir -p $RPM_BUILD_ROOT/etc/gconf/schemas |
---|
84 | install -m 644 desktop/ldraw.mime $RPM_BUILD_ROOT/usr/share/mime-info/ldraw.mime |
---|
85 | install -m 644 desktop/ldraw.xml $RPM_BUILD_ROOT/usr/share/mime/packages/ldraw.xml |
---|
86 | install -m 644 desktop/ldraw.keys $RPM_BUILD_ROOT/usr/share/mime-info/ldraw.keys |
---|
87 | install -m 644 desktop/ldview.applications $RPM_BUILD_ROOT/usr/share/application-registry/ldview.applications |
---|
88 | install -m 644 xfce/ldraw.desktop $RPM_BUILD_ROOT/usr/share/applications/ldraw.desktop |
---|
89 | install -m 755 desktop/ldraw-thumbnailer $RPM_BUILD_ROOT/usr/bin/ldraw-thumbnailer |
---|
90 | install -m 644 images/LDViewIcon.png $RPM_BUILD_ROOT/usr/share/pixmaps/gnome-ldraw.png |
---|
91 | install -m 644 images/LDViewIcon.png $RPM_BUILD_ROOT/usr/share/icons/gnome/32x32/mimetypes/gnome-mime-application-x-ldraw.png |
---|
92 | install -m 644 images/LDViewIcon.png $RPM_BUILD_ROOT/usr/share/icons/gnome/32x32/mimetypes/gnome-mime-application-x-multipart-ldraw.png |
---|
93 | install -m 644 desktop/ldraw.schemas $RPM_BUILD_ROOT/etc/gconf/schemas/ldraw.schemas |
---|
94 | |
---|
95 | cd .. |
---|
96 | install -m 755 OSMesa/ldview $RPM_BUILD_ROOT/usr/bin/ldview |
---|
97 | |
---|
98 | |
---|
99 | %files |
---|
100 | /usr/bin/LDView |
---|
101 | /usr/share/ldview/SansSerif.fnt |
---|
102 | /usr/share/ldview/Help.html |
---|
103 | /usr/share/ldview/license.txt |
---|
104 | /usr/share/ldview/ChangeHistory.html |
---|
105 | /usr/share/ldview/m6459.ldr |
---|
106 | /usr/share/ldview/8464.mpd |
---|
107 | /usr/share/ldview/Readme.txt |
---|
108 | /usr/share/ldview/LDViewMessages.ini |
---|
109 | /usr/share/ldview/LDViewMessages_de.ini |
---|
110 | /usr/share/ldview/LDViewMessages_it.ini |
---|
111 | /usr/share/ldview/LDViewMessages_cz.ini |
---|
112 | /usr/share/ldview/LDViewMessages_hu.ini |
---|
113 | /usr/share/ldview/todo.txt |
---|
114 | #/usr/share/ldview/ldview_en.qm |
---|
115 | #/usr/share/ldview/ldview_de.qm |
---|
116 | #/usr/share/ldview/ldview_it.qm |
---|
117 | #/usr/share/ldview/ldview_cz.qm |
---|
118 | /usr/share/ldview/LGEO.xml |
---|
119 | |
---|
120 | %clean |
---|
121 | rm -rf $RPM_BUILD_ROOT |
---|
122 | |
---|
123 | %package osmesa |
---|
124 | Summary: OSMesa port of LDView for servers without X11 |
---|
125 | Group: Applications/Multimedia |
---|
126 | Requires: ldview |
---|
127 | %description osmesa |
---|
128 | OSMesa port of LDView for servers without X11 |
---|
129 | |
---|
130 | %files osmesa |
---|
131 | /usr/bin/ldview |
---|
132 | |
---|
133 | %package gnome |
---|
134 | Summary: Gnome integration for LDView |
---|
135 | Group: Applications/Multimedia |
---|
136 | Requires: ldview |
---|
137 | PreReq: GConf2, shared-mime-info, desktop-file-utils |
---|
138 | %description gnome |
---|
139 | Gnome integration for LDView |
---|
140 | |
---|
141 | %files gnome |
---|
142 | /usr/share/mime-info/ldraw.mime |
---|
143 | /usr/share/mime/packages/ldraw.xml |
---|
144 | /usr/share/mime-info/ldraw.keys |
---|
145 | /usr/share/application-registry/ldview.applications |
---|
146 | /usr/share/applications/ldraw.desktop |
---|
147 | /usr/bin/ldraw-thumbnailer |
---|
148 | /usr/share/pixmaps/gnome-ldraw.png |
---|
149 | /usr/share/icons/gnome/32x32/mimetypes/gnome-mime-application-x-ldraw.png |
---|
150 | /usr/share/icons/gnome/32x32/mimetypes/gnome-mime-application-x-multipart-ldraw.png |
---|
151 | /etc/gconf/schemas/ldraw.schemas |
---|
152 | |
---|
153 | %post gnome |
---|
154 | update-mime-database /usr/share/mime >/dev/null |
---|
155 | update-desktop-database |
---|
156 | cd /etc/gconf/schemas |
---|
157 | GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ |
---|
158 | gconftool-2 --makefile-install-rule ldraw.schemas >/dev/null |
---|
159 | pidof nautilus | xargs --no-run-if-empty kill -s HUP |
---|
160 | |
---|
161 | %postun gnome |
---|
162 | update-mime-database /usr/share/mime >/dev/null |
---|
163 | update-desktop-database |
---|
164 | |
---|
165 | %preun gnome |
---|
166 | cd /etc/gconf/schemas |
---|
167 | GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ |
---|
168 | gconftool-2 --makefile-uninstall-rule ldraw.schemas >/dev/null |
---|