]> git.pld-linux.org Git - packages/elficon.git/blob - elficon.spec
add script to make release tarball from source repo
[packages/elficon.git] / elficon.spec
1 Summary:        Adding icons to ELF binaries
2 Name:           elficon
3 Version:        0.6.0
4 Release:        0.6
5 # libr: LGPL v2.1; libr-libbfd backend: LGPL v3; elfres, gnome-thumbnailer: MIT
6 License:        LGPL v2.1, LGPL v3, MIT
7 Group:          Applications
8 Source0:        http://www.compholio.com/elfres/download.php?file=%{name}_%{version}.tar.gz
9 # Source0-md5:  6ad0ff2dbd9f561b7372a03b5d82c778
10 Patch0:         libtool.patch
11 Patch1:         default-icon.patch
12 URL:            http://www.compholio.com/elfres/
13 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15 %description
16 This project is intended to provide an easy to use mechanism for
17 managing (embedding, retrieving, deleting) resources in ELF binaries.
18 The project has two components: elfres and libr. elfres is a resource
19 editor and an example of how to utilize the libr library. The libr
20 library provides a solid API and ABI that implements the preliminary
21 spec for adding ELF resources (icons or otherwise) documented at:
22 <https://wiki.ubuntu.com/ELFIconSpec>
23
24 %package -n libr
25 Summary:        Library to manage resources in ELF binaries
26 # library: LGPL v2.1, backend for libbfd: LGPL v3
27 License:        LGPL v2.1, LGPL v3
28 Group:          Libraries
29
30 %description -n libr
31 This library is intended to provide an easy to use mechanism for
32 managing (embedding, retrieving, deleting) resources in ELF binaries.
33
34 %package -n libr-devel
35 Summary:        Header files for libr library
36 Group:          Development/Libraries
37 Group:          Libraries
38 Requires:       libr = %{version}-%{release}
39
40 %description -n libr-devel
41 Header files for libr library.
42
43 %package -n elfres
44 Summary:        elfres - Manage application resources in ELF binaries
45 License:        MIT
46 Group:          Applications
47 Requires:       libr = %{version}-%{release}
48
49 %description -n elfres
50 This application is a technology demonstration, at this point please
51 DO NOT consider this implementation to be a specification for how ELF
52 icons will be supported by desktop environments. With that said, this
53 application and the associated "libr" resource library provide a solid
54 mechanism for managing application resources that you are free to use
55 in your own applications.
56
57 %package -n gnome-elf-thumbnailer
58 Summary:        Generate thumbnailers for ELF binaries with icons
59 License:        MIT
60 Group:          X11/Applications
61 Requires:       elfres = %{version}-%{release}
62 Requires:       glib2 >= 1:2.26.0
63 Requires:       gnome-themes-standard
64
65 %description -n gnome-elf-thumbnailer
66 Generate thumbnailers for ELF binaries with icons.
67
68 %prep
69 %setup -qc
70 %patch0 -p1
71 %patch1 -p1
72
73 %{__make} -C libr clean
74
75 %build
76
77 # libr
78 cd libr
79 %{__gettextize}
80 %{__libtoolize}
81 %{__aclocal}
82 %{__autoconf}
83 %{__autoheader}
84 %{__automake}
85 %configure \
86         --disable-static \
87 %if "%{?configure_cache}" == "1"
88         --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-libr.cache
89 %endif
90 %{__make}
91
92 export PKG_CONFIG_PATH=$(pwd)
93 export CPPFLAGS="%{rpmcppflags} -I$(pwd)/src"
94 export LDFLAGS="%{rpmldflags} -L$(pwd)/src/.libs"
95
96 # elfres
97 cd ../elfres
98 %{__gettextize}
99 %{__libtoolize}
100 %{__aclocal}
101 %{__autoconf}
102 %{__automake}
103 %configure \
104 %if "%{?configure_cache}" == "1"
105         --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-elfres.cache
106 %endif
107 %{__make}
108
109 # gnome-elf-thumbnailer
110 # nothing to build
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114 # libr
115 %{__make} -C libr install \
116         FAKEROOTKEY=1 \
117         DESTDIR=$RPM_BUILD_ROOT
118 # obsoleted by pkgconfig file
119 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libr.la
120
121 # elfres
122 %{__make} -C elfres install \
123         DESTDIR=$RPM_BUILD_ROOT
124 ln -s elfres $RPM_BUILD_ROOT%{_bindir}/elficon
125
126 %if 0
127 ln -sf elfres/src/.libs/elfres elficon \
128 # disabed, as it segfaults
129 top_srcdir=$(pwd) \
130 ELFRES=./elfres/src/.libs/elfres \
131 ELFICON=./elficon \
132 sh -x elfres/src/set-resources.sh $RPM_BUILD_ROOT%{_bindir}/elfres
133 %endif
134
135 # gnome-elf-thumbnailer
136 install -d $RPM_BUILD_ROOT%{_datadir}/gconf/schemas
137 %{__make} -C gnome-elf-thumbnailer install \
138         DESTDIR=$RPM_BUILD_ROOT
139 install -p gnome-elf-thumbnailer/src/gnome-elf-thumbnailer.sh $RPM_BUILD_ROOT%{_bindir}
140
141 %find_lang elfres
142
143 %post   -n libr -p /sbin/ldconfig
144 %postun -n libr -p /sbin/ldconfig
145
146 %post -n gnome-elf-thumbnailer
147 %glib_compile_schemas
148
149 %postun -n gnome-elf-thumbnailer
150 %glib_compile_schemas
151
152 %clean
153 rm -rf $RPM_BUILD_ROOT
154
155 %files -n libr
156 %defattr(644,root,root,755)
157 %doc libr/{AUTHORS,ChangeLog}
158 %{_libdir}/libr.so.*.*.*
159 %ghost %{_libdir}/libr.so.0
160
161 %files -n libr-devel
162 %defattr(644,root,root,755)
163 %{_includedir}/libr
164 %{_libdir}/libr.so
165 %{_pkgconfigdir}/libr.pc
166 %{_mandir}/man3/IconSVG.3*
167 %{_mandir}/man3/OneCanvasIconInfo.3*
168 %{_mandir}/man3/libr_*.3*
169
170 %files -n elfres -f elfres.lang
171 %defattr(644,root,root,755)
172 %doc elfres/{AUTHORS,COPYING,ChangeLog,README}
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_bindir}/elficon
175 %attr(755,root,root) %{_bindir}/elfres
176
177 %files -n gnome-elf-thumbnailer
178 %defattr(644,root,root,755)
179 %doc gnome-elf-thumbnailer/{COPYING,README}
180 %attr(755,root,root) %{_bindir}/gnome-elf-thumbnailer.sh
181 %{_datadir}/gconf/schemas/gnome-elf-thumbnailer.schemas
This page took 0.136348 seconds and 3 git commands to generate.