# === GLOBAL MACROS =========================================================== # According to Fedora Package Guidelines, it is advised that packages that can # process untrusted input are build with position-independent code (PIC). # # Koji should override the compilation flags and add the -fPIC or -fPIE flags # by default. This is here just in case this wouldn't happen for some reason. # For more info: https://fedoraproject.org/wiki/Packaging:Guidelines#PIE %global _hardened_build 1 # NOTE: Source tarball generated with git-archive from this git subtree: # http://git.ghostscript.com/?p=ghostpdl.git;a=tree;f=ijs;hb=HEAD # # We are currently waiting for upstream to set up a new mirror on Github, # so we can switch to it directly... %global revision_hash d26d2bb # ============================================================================= Name: libijs Summary: IJS Raster Image Transport Protocol Version: 0.35 Release: 1.git%{revision_hash}%{?dist} License: AGPLv3+ URL: https://ghostscript.com/ Source0: libijs-%{version}-%{revision_hash}.tar.xz # NOTE: Upstream hasn't included the license files into the git subtree yet. # We expect them to do so when the Github mirror is created. Source1: LICENSE Source2: COPYING BuildRequires: autoconf BuildRequires: automake BuildRequires: git BuildRequires: libtool # ============================================================================= # NOTE: 'autosetup' macro (below) uses 'git' for applying the patches: # ->> All the patches should be provided in 'git format-patch' format. # ->> Auxiliary repository will be created during 'fedpkg prep', you # can see all the applied patches there via 'git log'. # Upstream patches -- official upstream patches released by upstream since the # ---------------- last rebase that are necessary for any reason: #Patch000: example000.patch # Downstream patches -- these should be always included when doing rebase: # ------------------ #Patch100: example100.patch # Downstream patches for RHEL -- patches that we keep only in RHEL for various # --------------------------- reasons, but are not enabled in Fedora: %if %{defined rhel} || %{defined centos} #Patch200: example200.patch %endif # Patches to be removed -- deprecated functionality which shall be removed at # --------------------- some point in the future: %description The IJS (InkJet Server) Raster Image Transport Protocol is a library, which is no longer actively developed, and often other alternatives are used instead. This library, however, still seem to be useful for Ghostscript application to be able to connect to the HP IJS server to print on an HP printer. # === SUBPACKAGES ============================================================= %package devel Summary: Header & pkgconfig files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} BuildRequires: pkgconfig %description devel This subpackage provides /usr/include/ijs/ijs.h header file, as well as ijs.pc pkgconfig file. Both of these files are useful for development purposes only. # --------------- %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc This subpackage contains PDF documentation with IJS protocol specification, which is useful for development purposes only. # === BUILD INSTRUCTIONS ====================================================== # Call the 'autosetup' macro to prepare the environment, but do not patch the # source code yet -- we need to copy the LICENSE.* files into the directory: %prep %autosetup -N -S git cp -a %{SOURCE1} %{SOURCE2} . # Add and amend the copied files to the initial commit, patch the source code: git add --all --force . git commit --all --amend --no-edit > /dev/null %autopatch -p1 # --------------- %build %configure --disable-static --enable-shared %make_build # --------------- %install %make_install # Remove files that we don't want to ship: rm -rf %{buildroot}%{_bindir} rm -rf %{buildroot}%{_libdir}/*.la # Install the ijs_spec.pdf to correct location: install -m 0755 -d %{buildroot}%{_docdir}/%{name} install -m 0644 -p ijs_spec.pdf %{buildroot}%{_docdir}/%{name} # --------------- %post -p /sbin/ldconfig %postun -p /sbin/ldconfig # === PACKAGING INSTRUCTIONS ================================================== %files %license COPYING LICENSE %{_libdir}/libijs-%{version}.so # --------------- %files devel %dir %{_includedir}/ijs %{_includedir}/ijs/*.h %{_libdir}/libijs.so %{_libdir}/pkgconfig/*.pc # --------------- %files doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/ijs_spec.pdf # ============================================================================= %changelog * Wed Nov 22 2017 David Kaspar [Dee'Kej] - 0.35-1.gitd26d2bb - Initial specfile