Skip to content

Commit

Permalink
added spec
Browse files Browse the repository at this point in the history
  • Loading branch information
olear committed Aug 19, 2016
1 parent 5ae83ae commit 0b7191b
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cyan.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = cyan
VERSION = 1.0.0-RC1
VERSION = 1.0.0.RC1
TEMPLATE = app

SOURCES += src/main.cpp src/cyan.cpp src/magenta.cpp src/yellow.cpp
Expand All @@ -38,6 +38,8 @@ QMAKE_TARGET_COPYRIGHT = "Copyright (c)2016 Ole-André Rodlie <[email protected]
CONFIG += link_pkgconfig
PKGCONFIG += Magick++ lcms2

LIBS += `pkg-config --libs --static Magick++`

lessThan(QT_MAJOR_VERSION, 5): win32:RC_FILE += res/cyan.rc
greaterThan(QT_MAJOR_VERSION, 4): win32:RC_ICONS += res/cyan.ico

Expand Down
53 changes: 53 additions & 0 deletions res/cyan.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Summary: Prepress viewer and converter
Name: cyan

Version: 1.0.0.RC1
Release: 1%{dist}
License: GPLv2

Group: System Environment/Base
Packager: Ole-André Rodlie, <[email protected]>
URL: https://github.com/olear/cyan

Source: %{version}/%{name}-%{version}.tar.gz
Source1: ImageMagick-6.9.5-7.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires: zlib-devel lcms2-devel libpng-devel libtiff-devel libjpeg-turbo-devel gcc-c++ qt-devel

%description
Prepress viewer and converter

%prep
%setup
%setup -T -D -a 1

%build
export CYAN_TMP=$(pwd)/tmp
export PKG_CONFIG_PATH=$CYAN_TMP/lib/pkgconfig
export LD_LIBRARY_PATH=$CYAN_TMP/lib:$LD_LIBRARY_PATH
export PATH=$CYAN_TMP/bin:$PATH

cd ImageMagick-6.9.5-7
CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure --prefix=$CYAN_TMP --disable-docs --disable-deprecated --with-magick-plus-plus=yes --with-quantum-depth=32 --without-dps --without-djvu --without-fftw --without-fpx --without-gslib --without-gvc --without-jbig --with-jpeg --with-lcms --without-openjp2 --without-lqr --without-lzma --without-openexr --without-pango --with-png --without-rsvg --with-tiff --without-webp --without-xml --with-zlib --without-bzlib --enable-static --disable-shared --enable-hdri --without-freetype --without-fontconfig --without-x --without-modules
make %{?_smp_mflags} install
cp LICENSE LICENSE.ImageMagick
cd ..

qmake-qt4 PREFIX=/usr
make

%install
make INSTALL_ROOT=%{buildroot} install

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
/usr/bin/cyan
/usr/share/applications/cyan.desktop
/usr/share/pixmaps/cyan.png
%doc ImageMagick-6.9.5-7/LICENSE.ImageMagick

%changelog

0 comments on commit 0b7191b

Please sign in to comment.