Re: Support installation to chroot and allows easier settings lib64 for plugins

  • From: Charles A Edwards <eslrahc@xxxxxxxxxxxxx>
  • To: emelfm2@xxxxxxxxxxxxx
  • Date: Fri, 15 May 2009 18:38:26 -0400

On Fri, 15 May 2009 23:04:28 +0200
josef reidinger wrote:

> > This is not a "hack" and frankly it is a procedure which should be
> > given in your distributions packaging guidelines or if not then
> > it should be addressed on your distros Maintainers list.
> > 
> > Emelfm2 is not the only app that does not use 'configure' but 
> > instead make/make install.
> > And with all the builds for those apps you must define the prefix
> > for chroot/nonroot builds.
> > Many distros, including mine, uses a predefined marco for the
> > buildroot/tmppath (all our pkgs are built as user).
 
> Our distro use same way. Hack is that you need different variable for
> build and for install (which is not common for another packages).
> Purpose of DESTDIR variable is to have same variables for both make
> target. Default DESTDIR is / so if you not define it, it behavior is
> same as now.
> So you can use (pseudocode)
> set_build_variables;
> make;
> make install;


Then that issue may be distro specific as it does not occur here
with rpm.

Not the entire spec but does show some of Variables, build, install,and
file list.

%define svn 1690
%define name    emelfm2
%define version 0.6.0
%define release 1.%{svn}zae
 
%define prefix %{_prefix}

%prep
%setup -q -n %{name}-%{version}svn%{svn}  
 
%build

%make OPTIMIZE="${RPM_OPT_FLAGS}"   \
        CFLAGS="${RPM_OPT_FLAGS}" \
        USE_INOTIFY=1 \
        USE_LATEST=1 \
        PREFIX="%{_prefix}" \
        WITH_THUMBS=1 \
        WITH_TRACKER=1 \
        WITH_CUSTOMMOUSE=1 \
        WITH_HAL=1 \
        EDITOR_SPELLCHECK=1


%install
rm -rf $RPM_BUILD_ROOT

%make install PREFIX=%{buildroot}%{prefix}
 
%make install_i18n PREFIX=%{buildroot}%{prefix}

%files -f %{name}.lang
%defattr(644,root,root,755)
%doc docs/ACTIONS docs/CONFIGURATION docs/CREDITS
%doc docs/HACKING docs/README docs/TODO docs/USAGE
%doc docs/WARNING
%defattr (-,root,root) 
%{_bindir}/*
%{prefix}/share/pixmaps/*
%{prefix}/share/applications/*
%{prefix}/share/application-registry/* 
%{_libdir}/%{name}  
%{_iconsdir}/hicolor/48x48/apps/%{name}.png
%{_iconsdir}/hicolor/32x32/apps/%{name}.png
%{_iconsdir}/hicolor/24x24/apps/%{name}.png 
%{_mandir}/man1/* 


The build and resulting .rpm are in /home/charles/rpm and the
emelfm2-0.6.0-1.1690zae.x86_64.rpm can then be installed on any
compatible system.


    Charles


-- 
<WildTHing> ok guys .. so whens the next commit :PP
<taniwha> when they come to get me
----------------------
Mandriva Linux release 2010.0 (Cooker) for x86_64$
On SuperSize....http://www.eslrahc.com
Registered Linux user #182463
2.6.29.3-server-1mnb AMD Athlon(tm) 64 X2 Dual Core Processor 6400+
----------------------

Other related posts: