packaging: improve spec file accepted/tizen_3.0.m2_base accepted/tizen_3.0_base accepted/tizen_3.0_ivi accepted/tizen_4.0_base accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common tizen_3.0.m1_mobile tizen_3.0.m1_tv tizen_3.0.m2_base tizen_3.0_base tizen_3.0_ivi tizen_4.0_base tizen_4.0_tv accepted/tizen/3.0.m2/base/20170104.082133 accepted/tizen/3.0/base/20161028.102915 accepted/tizen/4.0/base/20170811.093124 accepted/tizen/4.0/base/20170828.221421 accepted/tizen/base/20151223.052359 accepted/tizen/common/20150107.100805 accepted/tizen/ivi/20150114.121602 accepted/tizen/mobile/20150114.130251 accepted/tizen/tv/20150112.114023 accepted/tizen/wearable/20150112.054908 submit/tizen_3.0.m2_base/20170104.073748 submit/tizen_3.0_base/20161028.062323 submit/tizen_4.0_base/20170811.071500 submit/tizen_4.0_base/20170828.000000 submit/tizen_4.0_base/20170828.000001 submit/tizen_base/20151223.111111 submit/tizen_base/20151223.111112 submit/tizen_common/20150106.100900 submit/tizen_ivi/20150108.111111 submit/tizen_ivi/20150112.222222 submit/tizen_mobile/20150109.000000 submit/tizen_mobile/20150112.000000 submit/tizen_tv/20150109.000000 submit/tizen_wearable/20150109.000000 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release tizen_3.0_ivi_release tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m1_release tizen_4.0.m2_release
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Mon, 22 Dec 2014 14:59:33 +0000 (15:59 +0100)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Tue, 6 Jan 2015 10:08:32 +0000 (11:08 +0100)
* Remove duplicate files using fdupes.
* Use macros.

Change-Id: I5557ffba56c7a3e554ae284718dd803e4f9553bb
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
packaging/groff.spec

index e074d2b..6cd7bce 100644 (file)
@@ -1,14 +1,15 @@
 Name:           groff
 Version:        1.22.2
-Release:        1
+Release:        0
 License:        BSD-3-Clause and GPL-2.0+
 Summary:        A document formatting system
 Url:            http://groff.ffii.org
 Group:          Base/Utilities
 Source:         %{name}-%{version}.tar.gz
-Source1001:    groff.manifest
+Source1001:     groff.manifest
 BuildRequires:  bison
 BuildRequires:  zlib-devel
+BuildRequires:  fdupes
 Requires:       /usr/bin/mktemp
 
 %description
@@ -34,35 +35,34 @@ to automatically determine groff command-line options, and the
 troff-to-ps print filter.
 
 
-
 %prep
 %setup -q
 cp %{SOURCE1001} .
 
 %build
 %configure --enable-multibyte
-make
+%__make
 
 %install
 mkdir -p %{buildroot}%{_prefix} %{buildroot}%{_infodir}
-make install manroot=%{buildroot}%{_mandir} \
-                       bindir=%{buildroot}%{_bindir} \
-                       mandir=%{buildroot}%{_mandir} \
-                       prefix=%{buildroot}/usr \
-                       exec_prefix=%{buildroot}/usr \
-                       sbindir=%{buildroot}%{_exec_prefix}/sbin \
-                       sysconfdir=%{buildroot}/etc \
-                       datadir=%{buildroot}/usr/share \
-                       infodir=%{buildroot}/%{_prefix}/info \
-                       sysconfdir=%{buildroot}/etc \
-                       includedir=%{buildroot}/usr/include \
-                       libdir=%{buildroot}/%{_libdir} \
-                       libexecdir=%{buildroot}/usr/libexec \
-                       localstatedir=%{buildroot}/var \
-                       sharedstatedir=%{buildroot}/usr/com \
-                       infodir=%{buildroot}/usr/share/info
-
-#install -m 644 doc/groff.info* %{buildroot}/%{_infodir}
+%make_install manroot=%{buildroot}%{_mandir} \
+              bindir=%{buildroot}%{_bindir} \
+              mandir=%{buildroot}%{_mandir} \
+              prefix=%{buildroot}%{_prefix} \
+              exec_prefix=%{buildroot}%{_prefix} \
+              sbindir=%{buildroot}%{_exec_prefix}/sbin \
+              sysconfdir=%{buildroot}%{_sysconfdir} \
+              datadir=%{buildroot}%{_datadir} \
+              infodir=%{buildroot}%{_prefix}/info \
+              sysconfdir=%{buildroot}%{_sysconfdir}\
+              includedir=%{buildroot}%{_includedir} \
+              libdir=%{buildroot}%{_libdir} \
+              libexecdir=%{buildroot}%{_prefix}/libexec \
+              localstatedir=%{buildroot}/var \
+              sharedstatedir=%{buildroot}%{_prefix}/com \
+              infodir=%{buildroot}%{_infodir}
+
+#install -m 644 doc/groff.info* %%{buildroot}%%{_infodir}
 ln -s s.tmac %{buildroot}%{_datadir}/groff/%{version}/tmac/gs.tmac
 ln -s mse.tmac %{buildroot}%{_datadir}/groff/%{version}/tmac/gmse.tmac
 ln -s m.tmac %{buildroot}%{_datadir}/groff/%{version}/tmac/gm.tmac
@@ -80,25 +80,26 @@ ln -s nroff %{buildroot}%{_bindir}/gnroff
 
 
 find %{buildroot}%{_bindir} -type f -o -type l | \
-       grep -v afmtodit | grep -v grog | grep -v mdoc.samples |\
-       grep -v mmroff |\
-       grep -v gxditview |\
-       sed "s|%{buildroot}||g" | sed "s|\.[0-9]|\.*|g" > groff-files
+    grep -v afmtodit | grep -v grog | grep -v mdoc.samples | \
+    grep -v mmroff | \
+    grep -v gxditview | \
+    sed "s|%{buildroot}||g" | sed "s|\.[0-9]|\.*|g" > groff-files
 
-ln -sf doc.tmac %{buildroot}%{_datadir}/groff/%{version}/tmac/docj.tmac
+ln -sf doc.tmac %{buildroot}%{_datadir}/%{name}/%{version}/tmac/docj.tmac
 # installed, but not packaged in rpm
-mkdir -p %{buildroot}%{_datadir}/groff/%{version}/groffer/
-chmod 755 %{buildroot}%{_libdir}/groff/groffer/version.sh
-mv %{buildroot}%{_libdir}/groff/groffer/* %{buildroot}/%{_datadir}/groff/%{version}/groffer/
+mkdir -p %{buildroot}%{_datadir}/%{name}/%{version}/groffer/
+chmod 755 %{buildroot}%{_libdir}/%{name}/groffer/version.sh
+mv %{buildroot}%{_libdir}/%{name}/groffer/* %{buildroot}/%{_datadir}/%{name}/%{version}/groffer/
 
+%fdupes %{buildroot}
 
 %remove_docs
 
-%files -f groff-files
+%files -f %{name}-files
 %license COPYING LICENSES
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
-%{_datadir}/groff
+%{_datadir}/%{name}
 
 %files perl
 %license COPYING LICENSES