RPM spec files

The place to discuss linux version of MakeMKV
Post Reply
cdslow
Posts: 4
Joined: Fri Aug 27, 2010 5:53 pm

RPM spec files

Post by cdslow »

Here it is:
makemkv_oss.spec

Code: Select all

# You can use '-without gui' command line switch
# to build only libraries

%define GUI %{?_without_gui:0}%{!?_without_gui:1}
%define debug_package %{nil}

Name: makemkv
Version: 1.5.8
Release: 0.beta.1
Source: http://www.makemkv.com/download/makemkv_v%{version}_oss.tar.gz
Packager: GuinpinSoft inc

Group: Applications/Multimedia
Summary: DVD and Blu-ray to MKV converter and network streamer
License: Mozilla Public License Version 1.1, LGLP 2.1 and later

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: make gcc gcc-c++ binutils coreutils openssl-devel zlib-devel
%if %{GUI}
BuildRequires: qt4-devel
%endif

%description
MakeMKV is your one-click solution to convert video that you own
into free and patents-unencumbered format that can be played everywhere.
MakeMKV is a format converter, otherwise called "transcoder".
It converts the video clips from proprietary (and usually encrypted)
disc into a set of MKV files, preserving most information
but not changing it in any way. The MKV format can store multiple
video/audio tracks with all meta-information and preserve chapters.

Additionally MakeMKV can instantly stream decrypted video
without intermediate conversion to wide range of players,
so you may watch Blu-ray and DVD discs with your favorite player
on your favorite OS or on your favorite device.

%prep
%setup -n makemkv_v%{version}_oss

%build
%if %{GUI}
make -f makefile.linux
%else
make -f makefile.linux out/libdriveio.so.0 out/libmakemkv.so.1
%endif

%install
rm -rf %{buildroot}
install -d %{buildroot}/%{_libdir}
install -t %{buildroot}/%{_libdir} out/libdriveio.so.0 out/libmakemkv.so.1
%if %{GUI}
install -d %{buildroot}/%{_bindir}
install -t %{buildroot}/%{_bindir} out/makemkv
%endif

%clean
rm -rf %{buildroot}

%package lib
Group: Applications/Multimedia
Summary: makemkv shared libraries
License: LGPL 2.1 and later

%description lib
Shared libraries, required by makemkv (libdriveio, libmakemkv)

%files lib
%defattr(-, root, root)
%{_libdir}/libdriveio.so.0
%{_libdir}/libmakemkv.so.1

%post lib
ldconfig

%if %{GUI}

%package gui
Group: Applications/Multimedia
Summary: DVD and Blu-ray to MKV converter and network streamer (Qt4 GUI)
License: Mozilla Public License Version 1.1
Requires: makemkv-con

%description gui
MakeMKV is your one-click solution to convert video that you own
into free and patents-unencumbered format that can be played everywhere.
MakeMKV is a format converter, otherwise called "transcoder".
It converts the video clips from proprietary (and usually encrypted)
disc into a set of MKV files, preserving most information
but not changing it in any way. The MKV format can store multiple
video/audio tracks with all meta-information and preserve chapters.

Additionally MakeMKV can instantly stream decrypted video
without intermediate conversion to wide range of players,
so you may watch Blu-ray and DVD discs with your favorite player
on your favorite OS or on your favorite device.

%files gui
%defattr(-, root, root)
%{_bindir}/makemkv

%endif
makemkv_bin.spec

Code: Select all

%define debug_package %{nil}

Name: makemkv-con
Version: 1.5.8
Release: 0.beta.1
Source: http://www.makemkv.com/download/makemkv_v%{version}_bin.tar.gz
ExclusiveArch: %{ix86} x86_64
Packager: GuinpinSoft inc

Group: Applications/Multimedia
Summary: DVD and Blu-ray to MKV converter and network streamer (command line)
License: GuinpinSoft inc

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: coreutils

Provides: makemkvcon
Requires: makemkv-lib

%description
MakeMKV is your one-click solution to convert video that you own
into free and patents-unencumbered format that can be played everywhere.
MakeMKV is a format converter, otherwise called "transcoder".
It converts the video clips from proprietary (and usually encrypted)
disc into a set of MKV files, preserving most information
but not changing it in any way. The MKV format can store multiple
video/audio tracks with all meta-information and preserve chapters.

Additionally MakeMKV can instantly stream decrypted video
without intermediate conversion to wide range of players,
so you may watch Blu-ray and DVD discs with your favorite player
on your favorite OS or on your favorite device.

%prep
%setup -n makemkv_v%{version}_bin

%build

%install
rm -rf %{buildroot}

install -d %{buildroot}/%{_bindir}
%ifarch %{ix86}
install -t %{buildroot}/%{_bindir} bin/i386/makemkvcon
%endif
%ifarch x86_64
install -t %{buildroot}/%{_bindir} bin/amd64/makemkvcon
%endif

install -d %{buildroot}/%{_docdir}/%{name}-%{version}
install -m 0644 -t %{buildroot}/%{_docdir}/%{name}-%{version} src/eula_en_linux.txt

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root)
%{_bindir}/makemkvcon
%doc %{_docdir}/%{name}-%{version}/eula_en_linux.txt

%pre
test -n "$PAGER" && PAGER=`which $PAGER`
test -z "$PAGER" && PAGER=`which less`
test -z "$PAGER" && PAGER=more
$PAGER <<_EOF_

Copyright (C) 2007-2010 GuinpinSoft inc

IMPORTANT NOTE 
 
The Software, as defined below, is protected by copyright, which is vested in GuinpinSoft inc. 
 
The Software may only be used in accordance with the terms and conditions set out in this document. 
 
If you do not read and agree to be bound by the terms and conditions defined in this document, you are not permitted to keep or use the Software in any way whatsoever and must destroy or return all copies of these items which are in your possession. 
 
 
END USER LICENSE AGREEMENT 
 
DEFINITIONS 
 
The following definitions apply to the terms and conditions included in this Agreement. 
 
MakeMKV 
means a computer program, developed by GuinpinSoft inc, for converting audio/video clips between different formats. 

Open-source Software
means certain files included into MakeMKV software package that are licensed under various open-source licenses. The full list of such files is specified in Appendix A. The full text of corresponding open-source licenses can be found in Appendix B.

Software 
means MakeMKV, all program and information files and other documentation which are part of the MakeMKV Software package but excluding Open-source Software.

Individual 
means a particular person. 
 
 
TERMS OF AGREEMENT 
 
This is a legal agreement between you, the users, and GuinpinSoft inc. By installing or using this Software, you agree to be bound by the terms of this agreement. If you do not agree to these terms, you may not use or install the Software. 
 
You are entitled to use the Software on all personal computers (laptops/desktops). "Use" means loaded in temporary memory or permanent storage on the computer.

You may not use the Software for any unlawful activity. Specifically, you may not use the Software to commit copyright infringement, you may only use the Software to make copies of works where you either hold the copyright or have obtained permission to copy from the copyright owner or where you allowed to make a copy by applicable law. If you violate the law you may be subject to claims for damages and/or criminal penalties.

The Software contains cryptographic functionality. The use of cryptographic software without a permit may be illegal in some jurisdictions. By the nature of audio/video format conversion the Software may bypass certain copy protection mechanisms to access audio/video data. You, the user, must check your local laws and regulations before using the Software to ensure that both activities are allowed in your jurisdiction.
 
You may not sell, rent, lease or sublicense the Software, without the explicit written consent of GuinpinSoft inc.

The Software is protected by copyright laws and international treaties.  
 
All intellectual property rights such as but not limited to patents, trademarks, copyrights or trade secret rights related to the Software are the property of and remains vested in GuinpinSoft inc. 
 
You shall not modify, translate, reverse engineer, decompile or disassemble the Software or any part thereof or otherwise attempt to derive source code, create or use derivative works therefrom. 
 
You are not allowed to remove, alter or destroy any proprietary, trademark or copyright markings or notices placed upon or contained with the Software.

You are allowed to redistribute the Software in it original unmodified form. In addition, as a special exception, you may extract and repackage Linux-specific part of the Software for the purpose of creating a distribution-specific package, as long as program files and this license remain unchanged.
 
 
YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT USE OF THE SOFTWARE IS AT YOUR OWN RISK AND THAT THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTIES OR CONDITIONS WHATSOEVER. GUINPINSOFT INC DOES NOT WARRANT THAT THE FUNCTIONS OF THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR FREE. YOU ASSUME RESPONSIBILITY FOR SELECTING THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS, AND FOR THE USE AND THE RESULTS OBTAINED FROM THE SOFTWARE. 
 
GUINPINSOFT INC DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES RELATED TO: NON-INFRINGEMENT, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF RESPONSES OR RESULTS, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
 
IN NO EVENT SHALL GUINPINSOFT INC BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR FOR ANY DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, PERSONAL INJURY, LOSS OF PRIVACY OR OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  
 
REGARDLESS OF THE FORM OF ACTION, GUINPINSOFT INC AGGREGATE LIABILITY ARISING OUT OF OR RELATED TO THIS AGREEMENT SHALL NOT EXCEED THE TOTAL AMOUNT PAYABLE BY YOU UNDER THIS AGREEMENT.  THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS SHALL APPLY TO THE MAXIMUM EXTENT ALLOWED BY APPLICABLE LAW. 
 
The Software may be subject to export or import regulations, and the user agrees to comply strictly with all such laws and regulations. The user agrees not to export or re-export the Software or any part thereof or information pertaining thereto to any country for which a U.S. government agency requires an export license or other governmental approval without first obtaining such license or approval. 
 
Any variation to the terms of this Agreement shall only be valid if made in writing by GuinpinSoft inc. 
 
Appendix A
This installation package does not contain any Open-source Software components.

Appendix B
There are no open-source licenses applicable to this package.

( press 'q' to close this screen )
_EOF_

echo "Please type \"yes\" if you accept the terms of the license"
read -e ANSWER < /dev/tty

if [ "$ANSWER" = "yes" ]
then
  exit 0;
fi

echo "Aborting installation"
exit 2;
If you include these spec files into makemkv tarballs, then binary packages for RPM based distros can be easily build with commands:

Code: Select all

rpmbuild -tb makemkv_v1.5.8_oss.tar.gz
rpmbuild -tb makemkv_v1.5.8_bin.tar.gz
skittle
Posts: 349
Joined: Thu Jan 14, 2010 4:23 am

Re: RPM spec files

Post by skittle »

Why not distribute PPA, DEB, pacman, PPC etc...

Honestly I would just prefer to distribute source files. Clean smaller download size, is not tied to any distro, and not tied to any pkdbuild script that could potentially break in the future.
mike admin
Posts: 4075
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: RPM spec files

Post by mike admin »

skittle wrote:Why not distribute PPA, DEB, pacman, PPC etc...
It's unlikely that we'll do it. However, if anyone wants to maintain deb/rpm or other packages, he'll get a full cooperation including advance drop of source/binaries and links from download page.
cdslow
Posts: 4
Joined: Fri Aug 27, 2010 5:53 pm

Re: RPM spec files

Post by cdslow »

By the way, it will be much easier for packagers (and GUI package installers), if you embed license agreement directly into makemkvcon, instead of build scripts.
And add command line and config file option "license-accepted".
leigh123linux
Posts: 1
Joined: Sun Sep 18, 2022 4:23 pm

Re: RPM spec files

Post by leigh123linux »

mike admin wrote:
Sun Sep 12, 2010 8:20 am
skittle wrote:Why not distribute PPA, DEB, pacman, PPC etc...
It's unlikely that we'll do it. However, if anyone wants to maintain deb/rpm or other packages, he'll get a full cooperation including advance drop of source/binaries and links from download page.
Can I take that as a permission to redistribute for rpmfusion nonfree repo?

https://admin.rpmfusion.org/pkgdb/packa ... h123linux/

https://src.fedoraproject.org/user/leigh123linux
mike admin
Posts: 4075
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: RPM spec files

Post by mike admin »

I missed this one. Of course, and you don't need an explicit permission - the license explicitly allows repackaging/redistribution for this purpose.
Post Reply